Jump to content

how to execute queries with the selected item in list box


cluce

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.