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 acer asus batch bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop lcd malware memory modem monitor motherboard network printer problem ram registry router slow software sound toshiba trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
evaluating condition?

Reply  
Thread Tools
sdeyoung1974's Avatar
Member with 162 posts.
 
Join Date: Apr 2005
Experience: A+, Network+
12-Oct-2009, 04: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,954 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
12-Oct-2009, 05: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
Member with 162 posts.
 
Join Date: Apr 2005
Experience: A+, Network+
12-Oct-2009, 07: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,954 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
12-Oct-2009, 07:46 PM #4
well yeah, that would be

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

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:15 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.