History.go(-1)

I have been designing a simple web form for asking visitors to our web site to answer a few simple questions.

If they don’t fill in all the fields, I was using a print statement to show a javascript error, and then history.go(-1) all in the web query save agent.

However, I have found that when the history.go returns to the form page, fields are re-initialised and cleared.

This is not what it used to do under v5 - it seems to be fields witrh @dblookup. Scouring this forum, it does seem to be a change in behaviour with v6.

However, I have a lot of forms on a v5 server (soon to be upgraded to v6)using this system. I used to use javascript on the form to validate fields, but I found compatibility issues where some browsers treated empty fields as ‘null’ and others as empty values. Handling it all on the server removed all the cross-browser issues.

However, am I going to have to go back to that?

Is there anything I can do to use the webquerysave to return to the form in case of an erro without losing field values?

Any help appreciated!

Subject: history.go(-1)

I would just use JavaScript to verify that all required fields are filled out and filled out correctly:

if(document.forms[0].FieldName1.value==“”)

{

document.forms[0].FieldName1.focus();

alert(“Fieldname1 must be filled out!”);

}

else

if(ContentError(document.forms[0].FieldName2.value))

{

document.forms[0].FieldName2.focus();

alert(“Fieldname2 must be syntactically correct!”);

}

else

{

document.forms[0].submit();

}