help!!!!

5 posts Page 1 of 1
Contributors
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

help!!!!
Shim
hello guys ,

i just want a javascript or and html code to popup a new window and navigate to a website it should happen when a visitor enters my website

so please can anyone help me ???
Find my programs on Softpedia
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: help!!!!
comathi
Use this code in the <body> tag of your html code:
Code: Select all
<body onload="window.open("http://www.yoursite.com")">
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: help!!!!
Codex
comathi wrote:
Use this code in the <body> tag of your html code:
Code: Select all
<body onload="window.open("http://www.yoursite.com")">
I think that that would cause a error, not sure though, if it does, try using single quotes:
Code: Select all
<body onload="window.open('http://www.yoursite.com')">
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: help!!!!
comathi
Codex wrote:
comathi wrote:
Use this code in the <body> tag of your html code:
Code: Select all
<body onload="window.open("http://www.yoursite.com")">
I think that that would cause a error, not sure though, if it does, try using single quotes:
Code: Select all
<body onload="window.open('http://www.yoursite.com')">
Oh yeah, I forgot about that. You do indeed need to use the simple quotes, as the double quotes are already used for the purpose of adding JavaScript to the <body> element. ;)
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: help!!!!
Shim
comathi wrote:
Codex wrote:
comathi wrote:
Use this code in the <body> tag of your html code:
Code: Select all
<body onload="window.open("http://www.yoursite.com")">
I think that that would cause a error, not sure though, if it does, try using single quotes:
Code: Select all
<body onload="window.open('http://www.yoursite.com')">
Oh yeah, I forgot about that. You do indeed need to use the simple quotes, as the double quotes are already used for the purpose of adding JavaScript to the <body> element. ;)
thank you comathi + codex
Find my programs on Softpedia
5 posts Page 1 of 1
Return to “Help & Support”