PDA

View Full Version : Do not Agree – If this is clicked the person should be sent back to homepage



geldesigns
12-19-2006, 07:24 PM
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.

BLiZZaRD
12-20-2006, 09:10 AM
Yes. Or redirected to nickkids.com

Was there a question here?

geldesigns
12-21-2006, 05:01 PM
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?

;-)

VatsaL
12-21-2006, 05:19 PM
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?

;-)


Is this what you mean?


<INPUT onclick="self.location.href=('http://google.com')" type=button value="I do not Agree">

thetestingsite
12-21-2006, 05:22 PM
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:




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*/
}
}


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.

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.



<input type="submit" value="Agree"> <input type="button" value="Cancel" onclick="window.location='index.html';">


Hope this helps out.

EDIT: Sorry VatsaL, posted at the same time.

VatsaL
12-21-2006, 05:56 PM
EDIT: Sorry VatsaL, posted at the same time.

That happened with me the 4th time this week.