Using Custom Buttons
by Michael Nuwer

T o use custom buttons on your web forms, you must use

| `<INPUT TYPE="image" NAME="myButton" SRC="signnow.gif">`

as your input tag. This tag places an image, which serves as a custom button, on an HTML form. When a user clicks the image, the form is submitted to the server.

The browser sends the input tag name as `name.x` and `name.y` with values that represent the offsets of the image. The CGI pairs will look like this:`name.x=25&name.y=10`. Thus, when using the “image” input type on an HTML form, your dBASE application must evaluate the name rather than the value of the name/value CGI pair. For this reason, each button on the web form should have a unique name. Your dBASE application will identify that name and use it to control the program’s flow.

On this web form each button’s name begins with the string`_op_` (op for option). When the dBASE application recieves a name/value pair where `left(CGIData,4) = "_op_"`, an option button has been found. The button name can than be saved to a memory variable which is used to control the program’s flow.

The sample program is available here.

Add | Edit | Save | Abandon | Delete

This is the HTML for the form:

| `<FORM METHOD="GET" ACTION="/bulletin/VDB_CGI.exe">` `<input TYPE="hidden" NAME="EXEFILENAME" VALUE=buttons.EXE>` `<TABLE BORDER COLS="5" WIDTH="100%">` `<TR>` `<TD ALIGN=Center><INPUT TYPE=IMAGE NAME=_op_add SRC="bu07web4.gif" BORDER="0"><BR>Add</TD>` `<TD ALIGN=Center><INPUT TYPE=IMAGE NAME=_op_edit SRC="bu07web5.gif" BORDER="0"><BR>Edit</TD>` `<TD ALIGN=Center><INPUT TYPE=IMAGE NAME=_op_save SRC="bu07web6.gif" BORDER="0"><BR>Save</TD>` `<TD ALIGN=Center><INPUT TYPE=IMAGE NAME=_op_abandon SRC="bu07web7.gif" BORDER="0"><BR>Abandon</TD>` `<TD ALIGN=Center><INPUT TYPE=IMAGE NAME=_op_delete SRC="bu07web8.gif" BORDER="0"><BR>Delete</TD>` `</TR>` `</TABLE>` `</FORM>`