Popup window on entering site

M

maak

Hello,
I would like to have a page popup whenver someone enters
any page on my site. This would only happen on entry
and not when navigating throughout the site. Any ideas?

To open a window in JavaScript:
window.open("adress","name","argumentes");
adress = URL
name must not be filled in.
arguments - are height, width, position ...

To prevent a window when the page is opened from another
page of you try:
example: www.xxx.yy

if(history.back().indexOf("www.xxx.yy")>-1)
{ window.open(...);
}

Or:

if(history.back().toString().indexOf("www.xxx.yy")>-1)
{ window.open(...);
}

I haven't tested this script yet.


maak
 
R

RickKaz

Thanks. I got it to work with the following script. Now
I am working on the history part. I'm not to good with
html or JS.

RickKaz

<head>
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id
+ "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menub
ar=1,resizable=1,width=1024,height=768,left = 64,top =
48');");
}
// End -->

</head>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top