View Full Version : I need popup window when i click on rollover link

02-27-2005, 10:12 AM
i need someone to help me with the following html with javascript... this contains the rollover-image link already, but i want a popup window of 700px width and 690px height to "popup" when you click on the rollover...

at the moment the rollover image just opens a new "normal" window like a normal link

the javascript for the popup might look like this:

<script language="javascript" type="text/javascript">//<!--
function popup()
{ window.open ("01.html","popup","width=700,height=690,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }

...but it just opens the new popup automatic and not when you click on the rollover link

this is the html i need edited....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Rollover Image Script - Place within <head> tag -->
<script language="JavaScript" type="text/javascript">
<!-- Hide from older browsers
function SwitchImg()
{ //start
var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
for (rem=0; rem < (SwitchImg.arguments.length-2); rem+=3) {
store = SwitchImg.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
(store.indexOf('document.all[')==0 && document.all==null))
store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
obj = eval(store);
if (obj != null) {
switcher[keep++] = obj;
switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
obj.src = SwitchImg.arguments[rem+2];
} }
document.Data = switcher;
} //end

function RestoreImg()
{ //start
if (document.Data != null)
for (var rem=0; rem<(document.Data.length-1); rem+=2)
} //end

// end hiding contents -->

<script language="javascript" type="text/javascript">
<table style="text-align: left; width: 1008px; height: 564px;"
border="0" cellpadding="2" cellspacing="2">
<td style="vertical-align: top; text-align: center;"><a href="01.html" onMouseOut="RestoreImg()" onMouseOver="SwitchImg('document.e1','document.e1','e1ani.gif')"><img src="e1.jpg" name="e1" width="200" height="110" alt="" border="0"></a></td>
<script language="javascript" type="text/javascript">//<!--
function popup()
{ window.open ("01.html","popup","width=700,height=690,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
<div style="text-align: center;"><br>

if anyone could help me, that would be great......greetz from germany, VIL

you can check the problem out if you want
here (http://plunkett.pl.funpic.de/dynamic/)

03-06-2005, 07:51 AM
Hi There,
I am absolutely certain I have found the solution to your problem. But first, would you please post the link that you want the pop-up to appear when clicked on please? Thanks

03-09-2005, 04:02 AM
You can't have quite that many parameters on openWindow. (Had that problem myself a while back.) Try concatenating into a variable and using the variable as a parameter. It should work just fine. Let me know if you have any problems and I'll dig up an example.


03-23-2005, 08:17 AM
thanks guys fixed the problem!!!!