CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   javascript Iframe PopUp help (http://www.codingforums.com/showthread.php?t=189139)

darktangent 02-12-2010 06:54 PM

javascript Iframe PopUp help
 
Hi, I am making an Iframe to pop up when users is leaving a page.. It is like a goodbye message. Now i have called a function with window.onbeforeunload.

The problem is that the iframe fires but disappears quickly.

To be precise it is a MOOdle popup and below is the code.

Code:

<html>
<head>
<title></title>

<script type="text/javascript" src="javascript/moodalbox121compressed/js/mootools.js"></script>
<script type="text/javascript" src="javascript/moodalbox121compressed/js/moodalbox.js"></script>
<script type="text/javascript" src="javascript/modalbox.js"></script>
<link href="javascript/moodalbox121compressed/css/moodalbox.css" rel="stylesheet" type="text/css" media="screen">
<script type="text/javascript">
window.onbeforeunload = popup;
function popup(){
MOOdalBox.open( "popup.htm","Some kind of caption", "450 305" )

}</script>

</head>



All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.