I have an "update" webform with a dropdown field. The dropdown field (VendorSelection) contains two selections/values (Value 1 and Value 2).
If a user selects Value 1 from my dropdown list, they will be redirected to the page in the Destination and Triggers section of the datapage wizard.
If a user selects Value 2 from my dropdown list, I need them to be redirected to a different datapage and to pass parameters into the webform associated with this datapage. I tried using the following javascript:
Unfortunately, the redirect is not happening when Value 2 is selected in my dropdown field. Can someone please, please tell me what I am doing wrong. I'm a javascript newbie. Thanks in advance!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
jayandang
I have an "update" webform with a dropdown field. The dropdown field (VendorSelection) contains two selections/values (Value 1 and Value 2).
If a user selects Value 1 from my dropdown list, they will be redirected to the page in the Destination and Triggers section of the datapage wizard.
If a user selects Value 2 from my dropdown list, I need them to be redirected to a different datapage and to pass parameters into the webform associated with this datapage. I tried using the following javascript:
function getDeps() {
if
(document.getElementById(\"EditRecordVendorSelection\").value == "Value 2")
{
window.location=\"http://www.myurl.com\";}
}
document.getElementById(\"caspioform\").onsubmit=getDeps;
Unfortunately, the redirect is not happening when Value 2 is selected in my dropdown field. Can someone please, please tell me what I am doing wrong. I'm a javascript newbie. Thanks in advance!
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.