Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old March 6th, 2006, 09:23 AM   #1
New Member
 

Join Date: May 2005
Location: Virginia US
Age: 32
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 gecastill is on a distinguished road
Question Disabling a dynamic drop-down with JavaScript

In a JSP page I am trying to disable a Trade Class drop-down list if the user does not select the ADULT option of the Division drop-down list.

Therefore, Trade Class drop-down list availability depends on the option selected in the Division drop-down list. For instance, if the user selects the KIDS division option then the Trade Class drop-down list should be disable.

I am trying to use JavaScript to do this but I can't get it to work.
I have the OnClick attribute in the Division drop-down list so that when a user selects any option from the list the index gets past to the JavaScript function. In my drop-down Division ADULT has index 1. see below

function enableDisableTradeClass( ) {
var index = document.frm_container_shipments.drp_division_fltr .selectedIndex;
//alert('Selected Division= ' + index);
if ( index != 1 ) {
document.frm_steps.drp_trade_class_fltr.value = "";
document.frm_steps.drp_trade_class_fltr.selectedIn dex = 0;
}
}

Please advise, thanks.
gecastill is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
disabling , dynamic , dropdown , javascript


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
(javascript)dynamic value to variable in src alexrozario JavaScript 0 July 13th, 2007 03:02 AM
Drop Down Menu not Working Since I added Toggle Javascript to Page davva JavaScript 1 May 19th, 2006 11:03 AM
problem with css/javascript drop down menu ultimate0 HTML, XHTML and CSS 9 March 29th, 2006 09:15 AM
CSS and Javascript Drop down menu barrysmith JavaScript 2 July 20th, 2005 08:35 AM
How can I search a drop-down list using JavaScript in IE gecastill JavaScript 9 May 31st, 2005 03:33 PM


Search Engine Optimization by vBSEO 3.2.0 RC8