to go to next page on click

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bugthefixer
Forum Contributor
Posts: 118
Joined: Mon Mar 22, 2004 2:35 am

to go to next page on click

Post by bugthefixer »

how can i make a page to go to next on clicking a button which is not a submit button.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Ummm, not sure if this syntax is correct but:

Code: Select all

<input type="button" value="Next Page" onClick="window.location=page2.php">
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

Post by fresh »

wrong..

it's document.location='myphp.php'..

but you were pretty close ;)
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

both work actually :P
kevin7
Forum Commoner
Posts: 96
Joined: Fri May 21, 2004 6:54 am

Post by kevin7 »

hmm... i'm usually using...

Code: Select all

<input type="button" value="Next Page" onClick="window.navigate('page2.php')">
Post Reply