PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________

I am designing forms which require doing submitForms to a server to do database lookups.

OK. Makes sense



I have an extremely annoying problem in that when a submitForm is waiting for a response from the server, it does not block user input. Thus, the user can enter data which is later overwritten when the FDF is received from the server and used to repopulate the form.

OK. That is pretty much what can be expected.



I would like to lock all the fields on the form to prevent this.

A good idea, as otherwise the unknowing user will get confused.



Is there any way I can trigger an event when the response has been received to the FDF and the form has been repopulated? That way I could use that event to unlock the fields again.

The point to trigger this locking event would be the according submit action. This could be set up selectively, and pretty much fine-tuned.



I also find that if I lock the fields as soon as I send a submitForm that, if the submitForm was triggered by the user tabbing off a field, the focus gets lost because I have locked the field that should have received the focus.� I have tried to implement a solution to this problem by locking the fields when a field gets focus immediately after a submitForm is sent.� This is not working well because it is difficult to know when to unlock the fields again.

Well, I think that has been discussed before. When the user tabs out of a field, the blur event will happen, and you would have to re-focus. This is normal forms behavior.



Has anyone else encountered this problem? I would think this is not an uncommon situation but I don't see it addressed in any documentation.

This is insofar an uncommon situation that you require to re-focus.


The very first question is why you need to get back to that field again. If there are good reasons for doing that (really good reasons, I mean), you are fine. There are ways to do it.

One possible approach would be the following:

You equip your form with a field being placed on top of everything. This field could even bear a message saying "be patient... I am just a lonely form trying to talk to a overworked and too busy server".

You also define a document level variable which we will call "cameFrom" in this example here.

You also create a function which recovers the previous state. This function hides the cover field described before, and will set the focus to the field name stored in the cameFrom variable.

In the Submit function you show the cover field, and assign the current field name to the cameFrom variable. Then you submit.

In the FDF you send back from the server, you call the recovery function (using the /JavaScript /After key; see Portable Document Format Specification, section about FDF, for more details).

And that should get you back to the field you came from...

Hope, this can help.


Max Wyss PRODOK Engineering Low Paper workflows, Smart documents, PDF forms CH-8906 Bonstetten, Switzerland

Fax:  +41 1 700 20 37
  or  +1 815 425 6566
e-mail:  mailto:[EMAIL PROTECTED]
http://www.prodok.com



[ Building Bridges for Information ]


______________________




To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html



Reply via email to