WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How to

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Processing Form Data

Keywords: 	 form data	 BinaryTag  iHTML Dialog Extender

Question:

When using webbatch is always neccessary to create the page with webout? The only examples I've seen are creating the entire page with webout. I refer to my earlier post about form variables. Can the be accessed by webbatch upon form submission?

From most of the examples I've seen for WebBatch it looks as though I have to create the whole page (including form) with WebBatch. Is that correct? Or, can I simply use WebBatch on a page to process some of the form data?

Answer:

  1. Mostly webout and weboutfile are used to send an html page back to the user.

    WebBatch is not invoked until a form is submitted.

  2. Ummm. You can have a static html form, and WebBatch just processes the form data,

    I find it easier to maintain if WebBatch does all the work, then the entire script and HTML is all in one place.


Another Question on Getting Form Data:

I have been reviewing the ihtml dialog extender and examples, particularly the HTML page template, to get at form data.

It provides a lot of needed info, but it doesn't really deal with a *real* web world example. In other words, it doesn't show how to extract form fields, parse them and send them, or an error message, back to the marker.

I want to get the form fields, parse them (i.e., making sure they are not blank, the email address is, for the most part, correct, and so on), then, I want to replace the {markers} in the template with the error message stating the problem with the form field. If there are errors with some fields, but not others, I want to display the error messages for the errored fields but suppress the {markers} from the form (I don't want curly braces to print).

So, I am wondering a few things here.

1. Wouldn't I use the WebParamNames( ) to get the form data, then subroutine it and return either a success or an error message? The return the error message into my {markers}.

I think I've got a handle on it. I just want to be validated.

Does that sound about right? Is anyone else doing this?

Answer:

Close.

WebParamNames gets you a list of availabe form data item names (not the values) It generally only used when you try to write a generic script that can handle an entire class of forms.

You really want WebParamData to get the value of some particular form variable.

After you figure out whether or not you like the data, then you can use the BinaryTag functions to replace your {{markers}}.


Article ID:   W14126
Filename:   Process Form Data.txt
File Created: 1999:06:09:14:33:38
Last Updated: 1999:06:09:14:33:38