Betty_S Posted December 5, 2006 Share Posted December 5, 2006 How can an onChange event (of a dropdown) call php?I want to do an action according to the user selection on my dropdown list (the <select> tag). I don't know how can I get the selected item id or name? And how can I set the onChange event of the dropdown? Quote Link to comment Share on other sites More sharing options...
Darkness Soul Posted December 5, 2006 Share Posted December 5, 2006 I know just one answer to it. Using a aux.php page, like ajax or iframe. When you change, the onchange="" active a js function, this one will call the page with the php code to execute at iframe/ajax. :)D.Soul Quote Link to comment Share on other sites More sharing options...
Betty_S Posted December 5, 2006 Author Share Posted December 5, 2006 So, the html calls the JavaScript and the JavaScript calls the php?Sound interesting, can u give an example code?Thanks! Quote Link to comment Share on other sites More sharing options...
Darkness Soul Posted December 6, 2006 Share Posted December 6, 2006 Sure, Just give me some time, I need to write it and now I'm full of work.. I'll send you a PM after, but send me one to the case I forget it.. ;)D.Soul Quote Link to comment Share on other sites More sharing options...
Betty_S Posted December 9, 2006 Author Share Posted December 9, 2006 Thanks Darkness Soul, you were very helpful, I got the main adie.Thanks! 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.