mikevaleriani
11-03-2002, 12:07 PM
:confused: Hello,
I am trying to set up a pop up window to give my visitors a choice before they can view the index page of my site. I tried to learn how to do that in the tutorial of this site, and everything works perfect except for the fact that the window doesn't open on its own. Visitors must click on a "click here" button in order to get the pop up window open. How do I clear that button and make the window open automatically as soon as the visitors arrive on that page? I know that it's something very silly and simple, but believe me, I have gone crazy so far and got nowhere :rolleyes:
You can view a page with the script at the following address: www.mikevaleriani.com/prova.html
Here is the script:
<script language="VBscript">
Sub entrance_onClick
returnvalue=MsgBox ("Would you like to listen to music while visiting this site?",36,"How About Some Music?")
If returnvalue=6 Then
window.location="http://www.mikevaleriani.com/frame_music.html"
Else
window.location="http://www.mikevaleriani.com/frame_main.html"
End If
End Sub
</script>
<script language="JavaScript">
function entrance2(){
if(navigator.appName!="Netscape")
return
if (confirm("Would you like to listen to music while visiting this site?"))
window.location="http://www.mikevaleriani.com/frame_music.html"
else
window.location="http://www.mikevaleriani.com/frame_main.html"
}
</script>
<form>
<input type="button" name="entrance" value="Click here" onClick="entrance2()">
</form>
Thank you so much to whoever can help me, I really appreciate that. :)
I am trying to set up a pop up window to give my visitors a choice before they can view the index page of my site. I tried to learn how to do that in the tutorial of this site, and everything works perfect except for the fact that the window doesn't open on its own. Visitors must click on a "click here" button in order to get the pop up window open. How do I clear that button and make the window open automatically as soon as the visitors arrive on that page? I know that it's something very silly and simple, but believe me, I have gone crazy so far and got nowhere :rolleyes:
You can view a page with the script at the following address: www.mikevaleriani.com/prova.html
Here is the script:
<script language="VBscript">
Sub entrance_onClick
returnvalue=MsgBox ("Would you like to listen to music while visiting this site?",36,"How About Some Music?")
If returnvalue=6 Then
window.location="http://www.mikevaleriani.com/frame_music.html"
Else
window.location="http://www.mikevaleriani.com/frame_main.html"
End If
End Sub
</script>
<script language="JavaScript">
function entrance2(){
if(navigator.appName!="Netscape")
return
if (confirm("Would you like to listen to music while visiting this site?"))
window.location="http://www.mikevaleriani.com/frame_music.html"
else
window.location="http://www.mikevaleriani.com/frame_main.html"
}
</script>
<form>
<input type="button" name="entrance" value="Click here" onClick="entrance2()">
</form>
Thank you so much to whoever can help me, I really appreciate that. :)