udee
02-24-2012, 11:02 AM
New member here. Hope y'all can help with a frustrating issue I have.
SYSTEM INFO:
I'm on an Apple MacBook Pro running OS X v10.7.3 (Safari v5.1.3).
PURPOSE:
I want to create a drop-down list of web sites I like. When the user selects an item, I want the browser to open a new window (or tab) with the URL provided.
THIS WORKS (but, as expected, content is placed in current window):
<form>
<select name="URL" OnChange="location.href=this.form.URL.options[selectedIndex].value">
<option value="" selected><b>Your network info ...</b></option>
<option value="http://www.aws.com/support/faq/software/ip.asp">Your IP address</option>
<option value="http://www.beelinebandwidthtest.com/">Your bandwidth speed (option 1)</option>
<option value="http://reviews.cnet.com/Bandwidth_meter/7004-7254_7-0.html">Your bandwidth speed (option 2)</option>
<option value="http://www.spamhaus.org/lookup.lasso">Spamhaus IP check</option>
</select>
</form>
BUT THIS DOESN'T WORK … WHY NOT? Expecting a new window (or tab) to be created.:
<form>
<select name="URL" OnChange="window.open(this.form.URL.options[selectedIndex].value)">
<option value="" selected><b>Your network info ...</b></option>
<option value="http://www.aws.com/support/faq/software/ip.asp">Your IP address</option>
<option value="http://www.beelinebandwidthtest.com/">Your bandwidth speed (option 1)</option>
<option value="http://reviews.cnet.com/Bandwidth_meter/7004-7254_7-0.html">Your bandwidth speed (option 2)</option>
<option value="http://www.spamhaus.org/lookup.lasso">Spamhaus IP check</option>
</select>
</form>
FYI … INTERESTINGLY, THE "window.open" CODE *DOES* WORK FOR A BUTTON. HMMMM.
<form>
<input type="button" value="Open Window" onclick="window.open('http://www.about.com')">
</form>
Anyone have a suggestion on what I'm doing wrong with the <SELECT OnChange=window.open()> event?
-- Udee
SYSTEM INFO:
I'm on an Apple MacBook Pro running OS X v10.7.3 (Safari v5.1.3).
PURPOSE:
I want to create a drop-down list of web sites I like. When the user selects an item, I want the browser to open a new window (or tab) with the URL provided.
THIS WORKS (but, as expected, content is placed in current window):
<form>
<select name="URL" OnChange="location.href=this.form.URL.options[selectedIndex].value">
<option value="" selected><b>Your network info ...</b></option>
<option value="http://www.aws.com/support/faq/software/ip.asp">Your IP address</option>
<option value="http://www.beelinebandwidthtest.com/">Your bandwidth speed (option 1)</option>
<option value="http://reviews.cnet.com/Bandwidth_meter/7004-7254_7-0.html">Your bandwidth speed (option 2)</option>
<option value="http://www.spamhaus.org/lookup.lasso">Spamhaus IP check</option>
</select>
</form>
BUT THIS DOESN'T WORK … WHY NOT? Expecting a new window (or tab) to be created.:
<form>
<select name="URL" OnChange="window.open(this.form.URL.options[selectedIndex].value)">
<option value="" selected><b>Your network info ...</b></option>
<option value="http://www.aws.com/support/faq/software/ip.asp">Your IP address</option>
<option value="http://www.beelinebandwidthtest.com/">Your bandwidth speed (option 1)</option>
<option value="http://reviews.cnet.com/Bandwidth_meter/7004-7254_7-0.html">Your bandwidth speed (option 2)</option>
<option value="http://www.spamhaus.org/lookup.lasso">Spamhaus IP check</option>
</select>
</form>
FYI … INTERESTINGLY, THE "window.open" CODE *DOES* WORK FOR A BUTTON. HMMMM.
<form>
<input type="button" value="Open Window" onclick="window.open('http://www.about.com')">
</form>
Anyone have a suggestion on what I'm doing wrong with the <SELECT OnChange=window.open()> event?
-- Udee