I have a javascript function that currently changes the Submit action based on value of a variable called currentVal. I do have a select within this form with an ID of TRADE_IN that I also want to pass to the next page. How do I alter/add to this javascript to also submit this form select into the url so I can perform a $trade = $_REQUEST['TRADE_IN'];
on the next page as well?
function changeSubmit(currentVal, id) {
if(currentVal < 5) {
$('#avgSubmit'+id).val('myVolvo.php?plan=gold&age=1-4 years');
} else if(currentVal >=5 && currentVal < 10) {
$('#avgSubmit'+id).val('myVolvo.php?plan=gold&age=5-9 years');
} else {
$('#avgSubmit'+id).val('myVolvo.php?plan=gold&age=10 years');
}
}