To validate the said format we use the regular expression ^[A-Za-z]\w$, where \w matches any word character (alphanumeric) including the underscore (equivalent to [A-Za-z0-9_]).
Since $.prompt acts as a simple proxy to Impromptu, they accept the same options.
By simply including form fields in the html all form values are gathered and sent via the "f" (aka "form") parameter.
The "m" (aka "message") parameter is a j Query object of the message itself incase you need to modify the dom.
Great for "required fields" such as email addresses!
This tutorial will show you how to create a Java Script-enabled form that checks whether a user has filled in the form correctly before it's sent to the server. First we'll explain why form validation is a useful thing, and then build up a simple example form, explaining things as we go along.
Note: You do not need to do the things mentioned in this article if you have created your feedback form using the Feedback Form Script Wizard.
Among other things, the script made by the wizard automatically checks for empty fields.//It provides examples of how to create dialog boxes //with a text field, combo box and list box. //Imports are listed in full to show what's being used //could just import javax.swing.* and * etc.. $.prompt will always control the most recent prompt.If you ever need direct access to the current instance, you can call $.Api(); The bread and butter of Impromptu is forms. Next, the match() method of a string object is used to match the said regular expression against the input value.