Click to See Complete Forum and Search --> : drop down menu open window function instead of URL


blodefood
09-23-2003, 03:55 PM
I know how to construct a drop down menu so that selecting an option will open a new page or URL.

I have a separate function already written in javascript that works with a button called openall().

Is it possible to make an option open a javascript open window function instead of the page or URL.

I have this so far:

<form>
<select onChange="mailing=window.open('','mailing');mailing.location=this.options[this.selectedIndex].value;" style="font-family:'Arial';color:#000000;background-color:#FFFFFF;font-size:10pt;">
<option selected>- Select one - </option>
<option value="AllMail.asp" target="top">All</option>
<option value="othermail.asp">Other</option>
</select>
</form>

Would appreciate any help you can give.

Thanks,
blodefood:confused:

pyro
09-23-2003, 04:04 PM
How about:

<select onchange="window.open(this.options[this.selectedIndex].value,'child','width=640,height=480, scrollbars=1');>
<option value="http://www.webdevfaqs.com">
<option value="http://www.w3c.org">
</select>

blodefood
09-23-2003, 04:29 PM
Doesn't work yet, but I will keep trying.

If this info is helpful, the pages I am trying to open are in the same directory as the originating page.

- blodefood

pyro
09-23-2003, 04:35 PM
My mistake. I had a few error. Sorry 'bout that...

<select onchange="window.open(this.options[this.selectedIndex].value,'child','width=640,height=480, scrollbars=1');">
<option value="http://www.webdevfaqs.com">Web Dev FAQs</option>
<option value="http://www.w3c.org">W3C</option>
</select>

blodefood
09-23-2003, 04:50 PM
Thank you. Exactly what I needed!!!!

:D

pyro
09-23-2003, 05:00 PM
You bet... :)