sazzie Posted January 31, 2007 Share Posted January 31, 2007 Hi,I would like to know if it is possible to get 2 drop down lists in the same form to respondto a single onchange event declaration?So effectively, I want my selections to be sent only after the second drop down list has been altered. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 31, 2007 Share Posted January 31, 2007 Then only put the onchange on the second one, and have it check for a valid "first" input. Quote Link to comment Share on other sites More sharing options...
soman Posted February 1, 2007 Share Posted February 1, 2007 u can help from online.......... Quote Link to comment Share on other sites More sharing options...
sazzie Posted February 1, 2007 Author Share Posted February 1, 2007 [quote author=fenway link=topic=124884.msg518140#msg518140 date=1170264016]Then only put the onchange on the second one, and have it check for a valid "first" input.[/quote]Thanks. That makes sense. Can you advise on how I check for the "valid first entry"?Also, my form select element has an onchange function attached to it:[code]<form method="post" action="" ><select name="month" id="select_month" onChange="test();">................[/code]I use a separate pair of images to scroll through the months in both directions using the function below:[code]function scroll(dir) { var elementID=document.getElementById("select_month"); if( dir == 0 ) { if( elementID.selectedIndex-1 >= 0 ) elementID.selectedIndex-=1; } else { if( elementID.selectedIndex+1 <= 11 ) elementID.selectedIndex+=1; } }[/code]What I need is to get my scroll function to respond to onChange=test() just as my select drop downlist input element.Can you help please? ??? Quote Link to comment Share on other sites More sharing options...
fenway Posted February 1, 2007 Share Posted February 1, 2007 Well, I'm not sure what you mean... you have 2 dropdowns, sounds like you need to get at both selections Quote Link to comment Share on other sites More sharing options...
worldworld Posted February 2, 2007 Share Posted February 2, 2007 Well you can have .js file for two drop downs... If you want i can provide the source code... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.