DarkPrince2005 Posted March 23, 2008 Share Posted March 23, 2008 i've got two javascripts that i'd like to run in a drop down boxes onChange event, can this be done? <select onchange="javascript:window.location=this.value; setOptions()"> <option>- Select -</option> <option value="form.html">Form</option> <option value="form1.html">Form1</option> <option value="form2.html">Form2</option> <option value="form3.html">Form3</option> <option value="form4.html">Form4</option> </select> Quote Link to comment https://forums.phpfreaks.com/topic/97515-running-multiple-javascripts/ Share on other sites More sharing options...
wildteen88 Posted March 23, 2008 Share Posted March 23, 2008 You're redirecting user and calling the setOptions function at the same time. The setOptions function will never run as javascript will redirect the user before it gets to call the setOptions funcion. I'd say add redirection code at the end of the setOptions function. Quote Link to comment https://forums.phpfreaks.com/topic/97515-running-multiple-javascripts/#findComment-498971 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.