We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Redirect to a webpage depending on answer
Topic Started: Jun 12 2011, 09:25 PM (268 Views)
DelicateGlow
Member Avatar
Member
[ * ]
Board Address: Private
Board Software: ZetaBoards
Description: I want the code to be on a webpage. They get a question saying "Can you do x?" With a dropdown selection of "Yes" or "No"
If they select Yes, they'll get redirected to a webpage. If they select No, they'll get redirected to a different webpage.

Thanks!~
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
function go() {
window.location=document.getElementById("link").value;
}
</script>

<select id="link" onchange="go()">
<option>Please select an option</option>
<option value="URL">Yes</option>
<option value="URL">No</option>
</select>
Edit URL to the page you wish to redirect the user to.
Offline Profile Goto Top
 
DelicateGlow
Member Avatar
Member
[ * ]
Exactly what I wanted. Thank you.
Offline Profile Goto Top
 
Leonardo
Member Avatar
Hakuna Matata
[ *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic