Refresh form on web

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”

}

Subject: refresh form on web

from u r question what i understand is u want to display different blocks according to the status. This can be done using html and styles. hide formulas works only when we refresh the window so u should use styles to do these kind of work.

u heared about tag in html in this u can use style=“display:none” to hide “display:block” to show.

u r section A fields //this will be visible first

u r section A fields //this is hidded when u start

in javascript u can change the styles by

document.forms[0].getElementById( “sectionA” ).style.display =“none”;

u can do this using style property “visibility:hidden” and “visibility:visible”

u also replace span with div tag but span work in the same line itself. But div move the content to new line. So u can use according to u r requirement.

I hope this will help u

Thanks & Regards

Kannappan KS

kannappanksk@gmail.com