I want the user to go to one default page when a certain product is selected in the form "multi-select" and to a different page when the user chooses the "None Apply" in the 'multi-select'.
This is the JavaScript taken and modified from Marketo help article:
<script type="text/javascript">
function changeFollowupURL()
{
// first, set the default follow up page
var URL = 'none';
// override the default based on form values
// Replace this with your own rules for setting the new URL
if($jQ("#CitrixProducts").val() == "None apply")
{
URL = 'http://www.ncomputing.com/products/nseries';
$jQ('input[name="returnURL"]').val(URL);
$jQ('input[name="retURL"]').val(URL);
$jQ('input[name="returnLPId"]').val('5025');
}
else
{
URL = 'http://www.ncomputing.com/products/vspace-platform';
$jQ('input[name="returnURL"]').val(URL);
$jQ('input[name="retURL"]').val(URL);
//$jQ('input[name="returnLPId"]').val(URL);
}
return true;
}
function formSubmit(elt)
{
changeFollowupURL();
return Mkto.formSubmit(elt);
}
</script>
Unfortunately I am not getting something right. I am a bit green with JavaScript so any help would be much appreciated.
Thanks