Jump Menu displays in next cell - not new window

L

laknight

Hi,

I am looking for advice or direction as to how I can create some sort of
drop list or jump menu in a cell/column on the left side of my page and then
have the results of the choice made be displayed in the next cell/column over
ON THE SAME PAGE, not as a new window.

I am trying to avoid using asp or php becuase they are much too complicated
for what I need. Also, my hosting company server is not Windows based, so i
can not use asp anyway.

Any suggestions as to what direction to go in? Thanks!
 
J

Jon Spivey

Hi,
You could do something like this.
<script type="text/javascript">
function doText(s){
if(!document.getElementById)return;
document.getElementById("results").innerHTML=s;
}
</script>
<select
onchange="if(this.options.selectedIndex>0)doText(this.options[this.options.selectedIndex].value);">
<option value="">choose something</option>
<option value="widgets">widgets</option>
<option value="grommets">grommets</option>
</select>
<div id="results"></div>

Whatever you select in the dropdown appears in the div id=results.
Alternative if you want to display the contents of another page you could
use an iframe and set the url of the iframe to whatever is chosen in the
dropdown.

Cheers,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top