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
  Reply to this topic Start new topic
left right
dann12
post Aug 10 2011, 05:11 PM
Post #1


Member
**

Group: Members
Posts: 45
Joined: 22-July 11
Member No.: 199,963



I'm developing a website where when user clicks ok in alertbox he has to go to next page, but the next page is php page. So, how do I do it ?
Go to the top of the page 
 
  + Quote Post
sclek
post Aug 12 2011, 09:28 AM
Post #2


Super Duper Ninja
*****

Group: Members
Posts: 445
Joined: 20-October 07
From: Canada
Member No.: 1,615



If you want to redirect the user to another webpage you would simply do:

CODE
window.location = "http://somelocation.com/code.php";
Go to the top of the page 
 
  + Quote Post
dann12
post Aug 24 2011, 05:43 PM
Post #3


Member
**

Group: Members
Posts: 45
Joined: 22-July 11
Member No.: 199,963



it is not only redirection, I've do it only when he clicks ok in alertbox. So, how do I do it ? smile.gif
Go to the top of the page 
 
  + Quote Post
Unit158
post Jan 21 2012, 04:39 PM
Post #4


Newbie
*

Group: Members
Posts: 14
Joined: 21-January 12
Member No.: 226,854



QUOTE(dann12 @ Aug 24 2011, 05:43 PM) *
it is not only redirection, I've do it only when he clicks ok in alertbox. So, how do I do it ? smile.gif

Well, you can use AJAX to change the info of the popup. I would personally use jQuery, but whatever.
Go to the top of the page 
 
  + Quote Post
Ed
post Jan 21 2012, 06:04 PM
Post #5


Outrageously Uber Ninja
*******

Group: Administrators
Posts: 2,831
Joined: 11-March 07
From: UK
Member No.: 9



CODE
var p = confirm('Do it! I dare you, click ok"');

if(p)
   document.location.href = 'http://google.com';


Et voila smile.gif
Reason for edit: Oh wow this thread is old...
Go to the top of the page 
 
  + Quote Post
 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 25th May 2013 - 10:23 AM