RE: CUSTOM and SUBMIT

Joel Palmius <[email protected]> Fri, 18 Nov 2005 12:58:40 +0100 (CET)
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
On Tue, 15 Nov 2005, Dietrich J Kappe wrote:
>
> If I submit and encounter a validation error, going back to the previous
> page will have all of my previously submitted fields as blank. I'd like to
> set the value or checked so that I have the previously submitted values in
> there. Is there a preferred way to do this, or do I have to write some perl?
> (not a problem; I go all the way back to perl 3. ;-))

I'm not sure this is a server-side problem. I have noticed that some 
browsers sometimes forget the values of a form when going back. This is 
difficult to solve server-side, since clicking back in the browser never 
generates a request to the server.

In my browser (firefox), the fields are remembered.

> Sure. I've used various forms of javascript validation over the years and
> will likely use it as a first line of defense, but my typical surveys are
> huge instruments with very low completion percentages. I'd hate to lose an
> observation because some farmer (or stock broker or doctor) had javascript
> turned off.
>
> Is there a way to insert something into the body onload event? Then I can
> use the DOM to insert an onsubmit event myself.

I agree that it is a good idea to avoid javascript whenever possible.

I think you can use the ACCESSJS parameter in the SURVEY tag for including 
a script which runs on display of a page. (input is an url to a javascript 
file)

   // Joel

Skickat av Joel Palmius <[email protected]>
till survey-discussion