Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant get confirm script to work...

Status
Not open for further replies.

estesflyer

Programmer
Dec 19, 2000
284
US
what i wanna do, is have the window go to lycos.com if the user clicks cancel in the confirm box... but all the page does, is refresh.. (the original page, not the new window)


</script>
<script language=&quot;javascript&quot;>
<!--
function NewWindow()
{
var confirmalert=window.confirm(&quot;Warning - By entering this site, you agree to our dislcaimer, do you wish to continue?&quot;);

if (confirmalert)
{
window.open(&quot;top.self.close();
}
else
{
window.location.href='}
}
//-->
</script>
 
You could try just straight - window.location =' or document.location. Just leave out the href. &quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top