i’m having a problem refreshing a form on the web in javascript. i have a next button at the bottom of the form that sets a flag from “A” to “B” when all field validations are complete. setting the flag to “B” works fine and i can see the flag change on the screen imediately, but i want to use hide whens for the part of the form the user just completed depending on the flag and show the next part of the form. the next part will have it’s own next button at bottom to validate those fields and move to the part “C” of the form. i’m trying to put our company employment application online and it has 5 parts. if i can make it work this way… the form will not have to be 10 ft. long, but can’t figure it out. any suggestions??
thanks,
jason
//------------------------------//
//Validate First Name
if (document.forms[0].AppFirstName.value==“”)
{
window.alert(‘You must enter a First Name!’)
document.forms[0].AppFirstName.focus()
}
//------------------------------//
else if (document.forms[0].AppLastName.value==“”)
{
window.alert(‘You must enter a Last Name!’)
document.forms[0].AppLastName.focus()
}
//------------------------------//
//Validations Complete And Goto Next Page Of Application
else
{
//document.forms[0].__Click.value = ‘$Refresh’ //doesn’t work
//document.forms[0].submit() //doesn’t work
window.document.forms[0].AppStatus.value=“B”
}