Popup window

liunx

Guest
<a href=http://www.webdeveloper.com/forum/archive/index.php/"webradio.html" onMouseOut="RestoreImg()" onMouseOver="SwitchImg('document.webradiobtn','document.webradiobtn','webradio2.jpg')"><img src=http://www.webdeveloper.com/forum/archive/index.php/"webradio.jpg" name="webradiobtn" width="150" height="25" alt="鑸檔e ekstern webradio" border="0"></a><br />
<br />
This is the code I have in my webpage. Notice href=http://www.webdeveloper.com/forum/archive/index.php/"webradio.html". This is the thing I wanna change. I still want it to be exactly the same link with the same cursor and everything, but I want that document to pop up in a new window. How do I code this into the current rollover image?<!--content-->Try this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"# onMouseOut="RestoreImg()" onMouseOver="SwitchImg('document.webradiobtn','document.webradiobtn','webradio2.jpg')" onclick="('webradio.html','','');return false;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"webradio.jpg" name="webradiobtn" width="150" height="25" alt="鑸檔e ekstern webradio" border="0"></a><!--content-->Originally posted by lavalamp <br />
Try this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"# onMouseOut="RestoreImg()" onMouseOver="SwitchImg('document.webradiobtn','document.webradiobtn','webradio2.jpg')" onclick="('webradio.html','','');return false;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"webradio.jpg" name="webradiobtn" width="150" height="25" alt="鑸檔e ekstern webradio" border="0"></a> That'll leave you with a broken link for the 13% of users who do not use JavaScript. Use instead:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"webradio.html" onmouseiout="RestoreImg()" onmouseover="SwitchImg('document.webradiobtn','document.webradiobtn','webradio2.jpg')"><img src=http://www.webdeveloper.com/forum/archive/index.php/"webradio.jpg" name="webradiobtn" width="150" height="25" alt="鑸檔e ekstern webradio" border="0" onclick="window.open(this.href); return false"></a><!--content-->That didn't work, now webradio.html won't load at all.<br />
<br />
EDIT: Instead, the rollover IMAGE pops up in a new window (lol), and on top of that the rollover image freezes on the main page so wether you hav the mouse over the "webradio" button or not it still displays the rollover image...<br />
<br />
Check home.no.net/xmedia for the actual page, so you can get a more clear vision of the problem.<!--content-->No, hey, I found out! Haha! I just put the script that actually opens the window and the player inside the <head> tags, and added<br />
<br />
javascript:openPlayer('minradio.no', 'radio1bergen', '22');<br />
<br />
where the page to open should be. I had ofcourse copied the source of the page to my own, but as the radio relies on external information, it was clear enogh that it didn't work...<br />
<br />
Thx for your activity folx anyway!<!--content-->Well spotted about the broken link, so I figure if you're going to use:<br />
a href=http://www.webdeveloper.com/forum/archive/index.php/"webradio.html"<br />
<br />
it may also be better to include:<br />
target="_new"<br />
<br />
in the a tag so as to give the same effect for the ppl without js.<br />
<br />
Edit: I just realised on the school bus this morning that target="_new" should actually be target="_blank", just so you know.<!--content-->
 
Back
Top