Forum Moderators: open

Message Too Old, No Replies

Onclick events

         

dave1236

2:17 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



I have the following piece of code that directs users to a page based on their selection in a drop down menu. This code opens a new window, however, I need to modify it so the page opens in the same window.

Advice is appreciated!

</SELECT>
<input type="button" value="Go!" onclick="window.open(document.getElementById('list').value,'')" />
<br><br>

penders

2:59 pm on Sep 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



To open in the same window you could try this in your onclick event...

onclick="location.href=document.getElementById('list').value"

dave1236

4:36 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



Thanks! Works perfectly!