cluce Posted September 11, 2007 Share Posted September 11, 2007 how to execute queries with the selected item in list box ? I want to have an sql queiry that will generate when someone selects an item in the list box. I know this is done in the where clause. But my skills in javascript are not that good. Can this be done in dreamweaver 8? Or can someone give me an small example on how this can be done or any helpful websites? I did find this code. Is this something I can modify??? Any advice is greatly appreciated. <html> <head> <script type="text/javascript"> function favBrowser() { var mylist=document.getElementById("myList") document.getElementById("favorite").value=mylist.options[mylist.selectedIndex].text } </script> </head> <body> <form> Select your favorite browser: <select id="myList" onchange="favBrowser()"> <option>Internet Explorer</option> <option>Netscape</option> <option>Opera</option> </select> <p>Your favorite browser is: <input type="text" id="favorite" size="20"></p> </form> </body> </html> thanks in advance 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.