Conditional redirecting
-
I want to redirect my form to 2 different pages dependent on their choice in a drop-down menu item (for example ‘yes’ or ‘no’). I already tried this:
if (document.getElementById('example').value=='yes') { on_sent_ok: " location = 'http://www.redirectedpage1.com'; " } else { on_sent_ok: " location = 'http://www.redirectedpage2.com'; " }I think the (document.getElementById(‘example’).value==’yes’) gives a Null value because I always get redirected to the second page.
Can anyone help me?
The topic ‘Conditional redirecting’ is closed to new replies.