Onchange Onclick On...i Hate This ;-)

liunx

Guest
Ok, I admit it, Im no code-guy. In fact I get lost on the second line in scripts.<br />This one should probably not even be placed here, since its more a linking problem but...<br /><br />I found this website/service and I wanna use it but the site its gonna be placed on uses frames and when the link is clicked it opens up in a frame on my site but i want it to open up in a new window. What do i change to make that happen?<br />Since its recommended to not publish long scripts, here is a link to the site: <a href="http://cgi.wn.com/wnlinks/" target="_blank">World News Network links</a><br />It is "WorldHeadlines Languages dropdown" almost on the middle of the page i wanna use.<br /><br />-Thomas<!--content-->
Hi,<br /><br />Can I please see the coding your using for the box, like a link to the original website for it?<br /><br />Basically, you need to name all your frames. You can then use the "target" tag to make them open up in certain places.<br /><br />Jim<!--content-->
Did post the link to it in the original, but here it is again...<br /><a href="http://cgi.wn.com/wnlinks/" target="_blank">http://cgi.wn.com/wnlinks/</a><br />Its not the frames I have problems with, I know the " target="_blankthing, just dont see where in this script to insert it. By the way, dont know if it is relevant, but i use CuteSITE builder.<br /><br />-Thomas<!--content-->
Hi,<br /><br />Its relatively easy to do this.<br /><br />Look for the line called:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->onChange="window.location=].value"<!--c2--></div><!--ec2--><br /><br />Now have a look at this page, it tells you have to change such things.<br /><br /><a href="http://www.pageresource.com/jscript/jdrop3.htm" target="_blank">http://www.pageresource.com/jscript/jdrop3.htm</a><br /><br />I reckon it should be something like this:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->parent.right_frame.location=this.form.news.options[selectedIndex].value<!--c2--></div><!--ec2--><br /><br />Remember, <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->right_frame<!--c2--></div><!--ec2--> is the name of the frame your going too.<br /><br />Jim<!--content-->
Thomas, <br />Check your email. I modified the dropdown script in question to open a new window and sent the script to you. You also had an extra batch of style settings which I trimmed out.<br /><br />NEW WINDOW: I placed a sample here: <a href="http://www.samisite.com/temp/id81.htm" target="_blank">http://www.samisite.com/temp/id81.htm</a><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><SELECT NAME="news" SIZE="1" onChange="window.open(this.form.news.options[selectedIndex].value);" class=select><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />SAME WINDOW AT TOP (breaking the frame):<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><SELECT NAME="news" SIZE="1" onChange="top.location=this.form.news.options[selectedIndex].value" class=select><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />ORIGINAL (Opening under the top border, within the frame):<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><SELECT NAME="news" SIZE="1" onChange="window.location=this.form.news.options[selectedIndex].value" class=select><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />-Samantha<!--content-->
 
Back
Top