Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsWeb Design & DevelopmentClient Side ScriptingJavaScript right
left right
The_Fishmaster
post May 1 2008, 12:55 PM
Post #1


Newbie
*

Group: Members
Posts: 6
Joined: 1-May 08
From: Tuusula, Finland
Member No.: 23,548



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)
Go to the top of the page 
 
  + Quote Post
 
Start new topic
Replies (1 - 2)
Sickness
post Jul 5 2008, 02:59 PM
Post #2


Ninja
***

Group: Members
Posts: 268
Joined: 22-September 07
From: québec, Canada
Member No.: 406



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.
Go to the top of the page 
 
  + Quote Post
emoritz
post Nov 18 2008, 02:02 AM
Post #3


Newbie
*

Group: Members
Posts: 5
Joined: 15-November 08
Member No.: 69,096



CODE
parent.location = (confirm("Welcome to The Fishmaster Guild website!")) ? "index_2.html" : "http://www.google.com/";
Go to the top of the page 
 
  + Quote Post
 Closed Topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 20th May 2013 - 10:12 PM