Redirect buttons
Hello,
I'm hoping this is an easy one for most of you )
How do I make two buttons to do the following?
button 1: [Agree] when clicked goes to designated webpage
button 2: [Disagree] when clicked goes to a different designated webpage
Thanks,
MonaE
timjpriebe posted this at 19:59 — 29th November 2005.
He has: 2,667 posts
Joined: Dec 2004
Is this what you're talking about?
Busy posted this at 22:51 — 29th November 2005.
He has: 6,151 posts
Joined: May 2001
using onclick redirect is bad, as people can just view the source and go there without filling in the form.
just have your reset and submit - with values agree and disagree, and use an if statement to redirect to which ever one they do, the forms action is the same page btw.
if submit = agree send to agree page
elseif reset = disagree send to disagree place
else just display page again
the page
the form
I'm guessing this is a sign up page or something where as the person has to agree with your terms and conditions or something. If so be sure to use a checkbox for them to check as a lot of form bots can bypass this process
MonaE posted this at 23:40 — 29th November 2005.
They have: 5 posts
Joined: Nov 2005
Hello Busy,
I like your logic. Currently I have:
<script language="javascript">
function goURL1() {
window.document.location.href = 'http://www.elkgrovecity.org/gis/downloads.htm';
}
function goURL2() {
window.document.location.href = 'http://www.elkgrovecity.org/gis/default.htm';
}
</script>
I would really like to do it the way you describe, but do not have enough knowledge on how to create from your email ( Can you help )
MonaE
Busy posted this at 11:07 — 30th November 2005.
He has: 6,151 posts
Joined: May 2001
The way I described was with server side (PHP, ASP etc) as this was posted in that section, with Javascript it would not be hidden.
Are you able to do it in PHP or ASP or something?
timjpriebe posted this at 13:17 — 30th November 2005.
He has: 2,667 posts
Joined: Dec 2004
Sorry, MonaE didn't mention having a form that had to be filled out. I also didn't make a note of what forum this was in. (My fault.)
Of course, Busy is right, and it will have to be server side (not JavaScript or HTML) if you want the URLs to be completely hidden.
Tim
http://www.tandswebdesign.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.