How Do I Call Php Script Through Javascript ? |
||
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.
Zymic Webmaster Forums Web Design & Development Client Side Scripting JavaScript |
||
![]() |
How Do I Call Php Script Through Javascript ? |
||
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 ?
|
|
|
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";
|
|
|
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 ?
|
|
|
Jan 21 2012, 04:39 PM
Post
#4
|
|
|
Newbie ![]() Group: Members Posts: 14 Joined: 21-January 12 Member No.: 226,854 |
|
|
|
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
Reason for edit: Oh wow this thread is old...
|
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 21st May 2013 - 12:32 PM |