New Window Syntax in Select structure?

admin

Administrator
Staff member
Hi,<br />
<br />
<A href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.drudgereport.com/" target="_blank">The Drudge!</A> <br />
<br />
Will display the link in a new window.<br />
<br />
Does anyone know the syntax for getting the same results from a Select structure?<br />
<br />
<SELECT onchange="location=document.news.menu.options[document.news.menu.selectedIndex].value;" value="GO" name="menu" style="background-color:#F0F8FF;font-family:Arial; font-size:8pt"><br />
<br />
<OPTION value="http://www.drudgereport.com/"><br />
.. Drudge Report<br />
</OPTION><br />
</SELECT><br />
<br />
Thank you.<!--content-->Thanks Dave,<br />
<br />
I'll try and figure out why your suggestion isn't working.<br />
<br />
<SELECT onchange="var url = document.news.menu.options[document.news.menu.selectedIndex].value var winPtr = window.open(url, '_blank') return true;"> <br />
<br />
<br />
<OPTION value="#"><br />
---- News Sources ----<br />
</OPTION><br />
<br />
<OPTION value="http://www.worldnetdaily.com/"><br />
.. World Net Daily<br />
</OPTION><br />
<br />
</SELECT<br />
<br />
<br />
It's probably something simple. I'll keep trying.<!--content-->Dave,<br />
The below is the code you suggested exactly, and you are incorrect. It doesn't work.<br />
<br />
<SELECT onchange=" <br />
var url = this.options[this.selectedIndex].value; <br />
var winPtr = window.open(url, '_blank', features); <br />
return true;"<br />
<br />
<OPTION value="#"><br />
---- News Sources ----<br />
</OPTION><br />
<br />
<OPTION value="http://www.worldnetdaily.com/"><br />
.. World Net Daily<br />
</OPTION><br />
<br />
<OPTION value="http://www.newsmax.com/"><br />
.. NewsMax<br />
</OPTION><br />
<br />
<OPTION value="http://www.sierratimes.com/"><br />
.. Sierra Times<br />
</OPTION><br />
<br />
<OPTION value="http://www.drudgereport.com/"><br />
.. Drudge Report<br />
</OPTION><br />
</SELECT><!--content-->Thanks Dave. I corrected as you pointed out, and it works.<br />
<br />
Can you point me to a link that explains the syntax of the Features. The new window that is now coming up is not of the size and position I would like, and I suspect the Features option would address this issue.<!--content-->Dave,<br />
I figured out that the features are the attributes of the Select, and have adjusted them accordingly.<br />
<br />
Can you still point me to a link, or explain the syntax for displaying the new window in the size and position of my choosing?<!--content-->Thank you Dave that's a great resource for Syntax, I'll especially make use of the parent tree of that link.<!--content-->some people can't resist criticizing it just because it is from MS <br />
<br />
I tire of the narrow minded people in our industry who bite the hand that feeds them. MS has done more for our industry than any single computer technology company. The number of people who earn their livelyhood because of MS products is very significant.<!--content-->
 
Back
Top