Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q907 How can I open a popup window - once only - when my frameset loads?

irt.org | Knowledge Base | JavaScript | Window | Q907 [ previous next ]

Q907 How can I open a popup window - once only - when my frameset loads?

The easiest thing to use is the Framesets onLoad event handler:

<html>
<head>
<script language="JavaScript"><!--
var windowHandler = null;

function openWindow() {
    windowHandler = window.open('http://www.irt.org','windowName','width=640,height=480');
}
//--></script>
</head>

<frameset cols="50%,*" onLoad="openWindow()">
<frame src="pagea.htm">
<frame src="pageb.htm">
</frameset>

This way the window will be opened when the complete frameset loads first time. If the user navigates your site within the frames then the popup will not load again.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.