Forum Moderators: open

Message Too Old, No Replies

Onchange problem

Onchange problem

         

crankshaft

9:52 am on Apr 13, 2005 (gmt 0)

10+ Year Member



I have been trying this for a good 3 hours, have googled it and cannot find any examples of onchange dropdowns which add a POST variable to a page to be loaded in an inline frame.

I can find tens of thousands of examples of loading the selected option in it's entirety, but none showing how to add it as a variable paremeter to a constant page name!.

I feel it should look something like this below, but I have tried many variations and it does not work.

This results only in 'index.php?page='
select name="page" onchange="top.I1.location.href='index.php?page='+this.value;">
<option>para1</option>
<option>para2</option>
</select>

Can someone pleeze help?

Thanx

PeterC

Reboot

7:08 pm on Apr 13, 2005 (gmt 0)



---Your sample:---

<select name = "page" onchange = "with (this) top.I1.location.href = 'index.php?page=' + options [selectedIndex].text;">

<option>para1</option>
<option>para2</option>
</select>