Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop up

Status
Not open for further replies.

mickywall

Programmer
Sep 2, 2002
88
0
0
GB
is there any way once i open a pop up window to close the existing window..
i tried to use <body onBlur=&quot;window.close()&quot;>
though this seems to bring up a message box with the option to close

 
Try this:

in HEAD tags

<script language=&quot;JavaScript&quot;>
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->

function popupWindow()
{
window.open(&quot; + &quot;menubar=no,scrollbars=no,resizable=no,&quot; + &quot;width=450,height=480,screenX=0,screenY=0&quot;)
}
</SCRIPT>

::::::::: And the code below is when you click image.jpg ::::::::

<img src=&quot;Image.jpg&quot; border=&quot;0&quot; width=&quot;150&quot; height=&quot;15&quot; onMousedown=&quot;popupWindow()&quot; onClick=&quot;setTimeout('window.close()',1000);&quot;>

.......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top