drop-down menu open in new window

liunx

Guest
ok...after much searching & tweaking i finally got my drop-down menu to work (i wanted to have a drop down that didn't require a 'submit' button)...however, now i want it to open in a new window and some of the HTML i copied was from an "open in a frame" post so i know 'why' it's not working...just not sure how to fix it! help pls!<br />
<br />
here's the code:<br />
<br />
<form><br />
<select onChange="parent.location=options[selectedIndex].value;"><br />
<option SELECTED>Pick A Site</option><br />
<option value="http://www.domain.com">Site1</option><br />
<option value="http://www.domain.com">Site2</option><br />
<option value="http://www.domain.com">Site3</option><br />
<option value="http://www.domain.com">Site4</option><br />
<option value="http://www.domain.com">Site5</option><br />
<option value="http://www.domain.com">Site6</option><br />
</select><br />
</form><br />
<br />
this line:<br />
<select onChange="parent.location=options[selectedIndex].value;"><br />
used to be this:<br />
<select onChange="parent.bottomframe.location=options[selectedIndex].value;"><br />
so i have tried tweaking it but everything i do doesn't work! TIA.<!--content-->Google is your friend....<br />
<br />
<!-- m --><a class="postlink" href="http://members.aol.com/websupport/grab/dropnewwin.html">http://members.aol.com/websupport/grab/dropnewwin.html</a><!-- m --><!--content-->Thanks Scoobs...but unless I am mistaken, the link you provided shows the example of a drop down menu that requires you to click on the submit button. I did start with a script like that and tried tweaking it to not need the button. After many attempts decided to find a different script w/out the button and therein lies my dilema of trying to figure out how to tweak my current script.<br />
I will try checking out their script to see if it shines a light on how to open in a new window...but my old script (the one that required a submit button) did open in a new window & comparing that one to my current one didn't help me either!<!--content-->try this:<br />
<p><csobj w="129" h="21" t="URLPopup" data="{ 0 = { label = "choose destination.."; selected = "YES"; }; 1 = { label = "link3"; url = "http://www.yourlink.com"; }; 2 = { label = "link2"; url = "http://www.yourlink.com"; }; 3 = { label = "link1"; url = "http://www.yourlink.com"; }; }" target="_blank"><br />
<form methode="POST" name="cs_form_name_0"><br />
<select name="cs_popup_name_0" onchange="CSURLPopupShow(/*CMP*/'cs_form_name_0', /*CMP*/'cs_popup_name_0', '_blank');"><br />
<option value="#" selected>choose destination..</option><br />
<option value="#">link3</option><br />
<option value="#">link2</option><br />
<option value="#">link1</option><br />
</select><br />
</form><br />
</csobj></p><!--content-->also, put this in head-tag:<br />
<csscriptdict><br />
<script><!--<br />
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);<br />
function IsIE() { return CSAg.indexOf("MSIE") > 0;}<br />
function CSIEStyl(s) { return document.all.tags("div").style; }<br />
function CSNSStyl(s) { return CSFindElement(s,0); }<br />
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];<br />
var curDoc = ly ? ly.document : document; var elem = curDoc[n];<br />
if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {<br />
elem = CSFindElement(n,curDoc.layers); if (elem) return elem; }}<br />
return elem;<br />
}<br />
<br />
function CSURLPopupShow(formName, popupName, target) {<br />
var form = CSFindElement(formName);<br />
var popup = form.elements[popupName];<br />
window.open(popup.options[popup.selectedIndex].value, target);<br />
popup.selectedIndex = 0;<br />
}<br />
<br />
<br />
<br />
// --></script><br />
</csscriptdict><!--content-->why have all that God Zilla when you can just do this<br />
<br />
<br />
<form><br />
<select onChange="window.open(this.options[this.selectedIndex].value)"><br />
<option SELECTED>Pick A Site</option><br />
<option value="http://www.domain.com">Site1</option><br />
<option value="http://www.domain.com">Site2</option><br />
<option value="http://www.domain.com">Site3</option><br />
<option value="http://www.domain.com">Site4</option><br />
<option value="http://www.domain.com">Site5</option><br />
<option value="http://www.domain.com">Site6</option><br />
</select><br />
</form><!--content-->:P Simple and workable!!!!<!--content-->yeah I fogot to add that part :P<br />
<br />
but after looking at what God Zila put down, I don't think she wants to do XML just for a little bitty form.<!--content-->thanks scoutt! i knew i could count on you to come to my rescue! :)<!--content-->:P you are welcome<!--content-->
 
Back
Top