AJAX Forums

how to validat DropDownList Box using javascript in asp.net (for client side...

This is a discussion on how to validat DropDownList Box using javascript in asp.net (for client side... within the JavaScript forums, part of the Beginners AJAX category; ...validation)? How to validate the user selected value or not in drop down list box , if not an alert message should display....


Go Back   AJAX Forums > Beginners AJAX > JavaScript

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Old 06-14-2007, 08:09 AM   #1 (permalink)
Junior Member
 
Join Date: Jun 2007
Posts: 1
Rep Power: 0 sunsetorange is on a distinguished road
how to validat DropDownList Box using javascript in asp.net (for client side...

...validation)? How to validate the user selected value or not in drop down list box , if not an alert message should display.
__________________
sunsetorange is offline   Reply With Quote
Old 06-14-2007, 11:48 PM   #2 (permalink)
Junior Member
 
Join Date: Jun 2007
Posts: 1
Rep Power: 0 jokeyxero is on a distinguished road
Please never use this way to reference an element:document . forms['myform'] . elements['myselect']Please use the standard way:document. getElementById("myselect")The first answer is correct otherwise.if ( document. getElementById("myselect"). selectedIndex < 0 ) { alert( "Please select an option." ); }
__________________
jokeyxero is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
JavaScript Powers Up the Server Side microbee AJAX Help 0 09-04-2008 07:05 PM
The Dark Side of AJAX - JavaScript Hijacking and How it Works microbee AJAX Help 0 09-04-2007 09:21 PM
"Thin Is In" &ndash; Is AJAX the Ultimate Client-Side Technology for Web Developers? microbee AJAX Help 0 01-16-2007 05:42 AM
AJAX Was Here - Part 1: Client Side Framework Ajaxking AJAX Articles 0 12-28-2006 12:55 AM
Saving Session Across Page Loads Without Cookies, On The Client Side megabyte AJAX Articles 0 12-21-2006 09:45 PM


All times are GMT -4. The time now is 10:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5
Copyright ©2006 - 2008, AJAXwith.com