http://qs321.pair.com?node_id=640039

hacker has asked for the wisdom of the Perl Monks concerning the following question:

I've been working on a web form that allows a user to fill in some parameters like url, link depth, images parameters and such.

When they submit the form, I currently do the following:

  1. Fetch the URL and extract all of the links found on the main page, returning a count
  2. Convert the content into another non-HTML format
  3. Display a configuration stanza so the user can use it to reproduce the same action on their own local machine at a later time,
  4. Present the user with the non-HTML converted file format for download ("Save As...")
  5. etc..

What I'd like to try to do, is make the form more usable for users, without the need to issue a Submit to return much of the basic results.

I'm not looking for "javascript form valdiation", but something to actually perform an action on the server-side every time the user moves between form fields.

For example, the user enters a URL into a textfield, and as they tab to the next form element, I'm fetching the URL they've entered and returning the count of links found, as they continue to fill out the rest of the form and before they submit the form.

Enter AJAX..

Have any monks implemented AJAX form validation and XMLHttpRequest style objects and server calls with all of the form and backend processing handled via Perl itself?

I'm looking for gotchas, pointers, samples and other things I can use to learn how to do this.

Barring that, is there another approach to making the form more usable for everybody's grandmother, without using AJAX or client-side validation tricks?

Thanks!