Do not Agree – If this is clicked the person should be sent back to the home page so that they wouldn’t be able to go on and enter any more information on this page.
Do not Agree – If this is clicked the person should be sent back to the home page so that they wouldn’t be able to go on and enter any more information on this page.
Yes. Or redirected to nickkids.com
Was there a question here?
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
How do i make "do Not Agree" or a "cancel" button send viewer back to index page when they click these buttons above in a website page?
;-)
There are a few ways to do it, the first option would be if you wanted a confirm box to pop up when a JS function is called (ie: doAgree() ). Take a look at the following snippet:
This pops up a confirm box (like the one on here when you click "Log Out"), if the user clicks "OK" then it redirects to the next page (edit as you like), if they hit "Cancel", then it redirects to the index.html page.Code:function doAgree() { if (confirm("Click 'OK' to agree!") { window.location='agree.html'; /*proceed to agree.html*/ } else { window.location='index.html'; /*send to index.html*/ } }
The next option would be if you wanted it somewhere on you page in a form. (ie: a list of Terms and Agreements that they must agree to before continuing.)
Below would be the submit ("Agree") and cancel ("Cancel") buttons at the end of the form.
Hope this helps out.Code:<input type="submit" value="Agree"> <input type="button" value="Cancel" onclick="window.location='index.html';">
EDIT: Sorry VatsaL, posted at the same time.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Bookmarks