4images Forum & Community

General / Allgemeines => Programming => Topic started by: hsbhabbe on September 02, 2009, 10:49:52 AM

Title: pop up window on start
Post by: hsbhabbe on September 02, 2009, 10:49:52 AM
Hi

I want to have a pop up window that pop ups
as soon as they visit my site. . . the page is called   help. html

do anyone have a suggestion how to solve that?

Thanks
Title: Re: pop up window on start
Post by: Hagen-Roderich on September 02, 2009, 11:22:55 AM
Code: [Select]
<script language="javascript" type="text/javascript">
<!--
var win=null;
function wait(){
setTimeout('m1238458157();',0000);
}
function m1238458157(){
myleft=20;
mytop=20;
settings="width=480,height=675,top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,dependent=no";
win=window.open("http://www.yourdomain/path/help.htm","HELP",settings);
win.focus();
}
setTimeout('win.close()', 30000);
setTimeout(0000);
onerror = stopError;
function stopError(){
return true;
}
// -->
</script>

Update: put the code on "home.html"
Title: Re: pop up window on start
Post by: hsbhabbe on September 02, 2009, 01:07:30 PM
Thanks for the reply. . .

this is what it says


Parse error: syntax error, unexpected '<' in /customers/lindebilder. se/lindebilder. se/httpd. www/index. php on line 15

what can i do?
Title: Re: pop up window on start
Post by: Hagen-Roderich on September 02, 2009, 02:24:28 PM
Parse error: syntax error, unexpected '<' in /customers/lindebilder. se/lindebilder. se/httpd. www/index. php on line 15

Please check: http://www.4homepages.de/forum/index.php?topic=25252.0
Title: Re: pop up window on start
Post by: V@no on September 02, 2009, 03:45:17 PM
that code is not for .php files, it's for header.html template, that's why.
Title: Re: pop up window on start
Post by: Rembrandt on September 02, 2009, 08:25:35 PM
Hi!
..I want to have a pop up window that pop ups
as soon as they visit my site. . . the page is called   help. html.

Code: [Select]
<script type="text/javascript">
function testit()
{
 window.open('http://www.yourDomain.com/blub/blabla.html', 'NewWindows', 'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,
width=800,height=600,left='+20+',top='+20+'');
}
 setTimeout("testit()", 1000);
</script>

mfg Andi
Title: Re: pop up window on start
Post by: hsbhabbe on September 03, 2009, 02:08:11 PM
Thanks for all help

but i tried in home and header. . . and nothing happends

maybee i am doing worng.
Title: Re: pop up window on start
Post by: Hagen-Roderich on September 03, 2009, 02:21:06 PM
Code: [Select]
<script type="text/javascript">
function testit()
{
 window.open('http://www.lindebilder.se/help.html', 'NewWindows', 'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,
width=800,height=600,left='+20+',top='+20+'');
}
 setTimeout("testit()", 1000);
</script>

You have adapted the path in file "home.html"?
Title: Re: pop up window on start
Post by: Rembrandt on September 03, 2009, 02:54:51 PM
...
You have adapted the path in file "home.html"?

warum sollte das nicht funktionieren?

mfg Andi
Title: Re: pop up window on start
Post by: Hagen-Roderich on September 03, 2009, 03:11:10 PM
...
You have adapted the path in file "home.html"?

warum sollte das nicht funktionieren?

mfg Andi

Ich meine nur falls er den Code ohne Anpassung übernommen haben sollte, das es dann nicht funzt. Deswegen habe ich noch mal "http://www.lindebilder.se/help.html" mit in deinen Code geschrieben.

http://javascript.internet.com/generators/popup-window.html