I'm trying to shorten a loan application form using Java to make it less daunting for people to filll in (hiding things such as partners details until the applicant has already filled in their own details).
I'm using this code for one of the fields and the option homeyes when selected reveals more form for the applicant to fill in which works fine - my problem is that I also need this menu to act as a filter and need the option tenant to jump the applicant to one third party/affiliate website and the option nomortgage to jump to a different third party site.
Can it be done and if so how?
This is the menu i'm using:
<select class=list_menu
id=homeinfo style="WIDTH: 170px"
tabIndex=18
onchange=homeinfo_status(this.options[this.selectedIndex].value)
name=homeinfo>
<option value="" selected>- Select -</option>
<option value=Tenant>Tenant/Live With Parents</option>
<option value=homeyes>Homeowner With Mortgage</option>
<option value=nomortgage>Homeowner With No Mortgage</option>
</select>
and this is the validation script that shows the dropdown:
}
function homeinfo_status(val) {
var home_dropdown = document.getElementById('home_information');
if(val=="homeyes") {
home_dropdown.style.display = "block";
} else {
home_dropdown.style.display = "none";
}
}
onload = function() {
marital_status(document.getElementById('maritalsta tus').options[document.getElementById('maritalstatus').selectedI ndex].value);
previous_address(document.getElementById('timeatad dress').options[document.getElementById('timeataddress').selectedI ndex].value);
homeinfo_status(document.getElementById('homeyes') .options[document.getElementById('homeyes').selectedIndex].value);
if(document.getElementById('second_mortgage_yes'). checked) { second_mortgage("yes"); }
}
Any ideas would really help me out - i'm a java script virgin.
PS... i'll prob be back for more advice in a while...my validations bound to heve bugs in it as well!lol
Cheers
Russ