Help - Search - Members - Calendar
Full Version: How To?
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > JavaScript
The_Fishmaster
I have done an script for my website and it looks like this
CODE
<script language="javascript">
if(confirm("Welcome to The Fishmaster Guild website!"))parent.location="index_2.html"
</script>
But if you press "Cancel" it goes to my website.
And my question is: How to make script what does that popup and if you press "Ok" it continues to website and if you press "Cancel" it returns you to last page you have visited.
(sorry for my bad English hope you understanded tongue.gif)
Sickness
add this after the if
CODE

else{
window.location="http://www.google.com/";
}

I'm not sure if it will work for you, but this work for me.
emoritz
CODE
parent.location = (confirm("Welcome to The Fishmaster Guild website!")) ? "index_2.html" : "http://www.google.com/";
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.