Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Web Design & Development
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor recovery router safe mode slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
evaluating condition?

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
sdeyoung1974's Avatar
Senior Member with 156 posts.
 
Join Date: Apr 2005
Experience: A+, Network+
12-Oct-2009, 03:41 PM #1
evaluating condition?
How would I evaluate a condition like this?

txtBox has a value but checkbox is not checked
need to display a message if this condition is met.

I know I can use the chkBox.checked = true or false for the checkbox condition but I'm not to sure how to test for the txtbox not being empty. I know how to test if the textbox would be empty
I would do the following.

txtBox = String.Empty or " "

help suggestions would be appreciated..
Hopefully this makes sense, lol
Big-K's Avatar
Distinguished Member with 6,940 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
12-Oct-2009, 04:59 PM #2
I assume its a textbox input element, which means it has a 'value' property.

if(txtBox.value == '')
alert('working');
sdeyoung1974's Avatar
Senior Member with 156 posts.
 
Join Date: Apr 2005
Experience: A+, Network+
12-Oct-2009, 06:15 PM #3
Yeah the textbox does have a value. But it's more like I want to warn if the user doesn't click the checkbox but does input a quantity in the textbox.
Big-K's Avatar
Distinguished Member with 6,940 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
12-Oct-2009, 06:46 PM #4
well yeah, that would be

if(chkBox.checked == false && txtBox.value != '') alert('stuff');
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 07:19 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.