CommonGround Softworks Inc.


August 8, 1999 - Osmosis Technical Note 7


Subject: Techniques for performing a submit from a graphic image


Problem:

Several users have requested a means by which a SUBMIT can be performed by clicking on an image. From a design standpoint, it is often desireable to have users click on graphic than having to click on a button. The approach demonstrated here is from Bernhard Schulze (b.schulze@abc-media.de)

Discussion:

Once a user clicks on the image, a SUBMIT is performed. The data is then sent to Osmosis and Helix returns the appropriate html page.

Bernhard also shows us that Osmosis does not have to reside on the web server machine..

Solution:


Each 'submit' image (within the HTML) consists of the following 5 lines:



<form name="mygraphic" action="http://10.1.1.1/cgi-bin/osmosis.acgi" method="post" target="main">

<input type="hidden" name="SCRIPT" value="myscript">

<input type="hidden" value="mygraphic" name="UserEntry0">

<input src="../_home/_main/main-01-01.jpg" width="109" height="120" border="0" type="image" name="mygraphic">

</form>



In line 1, the <form> tag is named. In this case, "mygraphic". This will be used by line 4 in determining which <form> is submitted. Also note that the 'action' attribute points to another machine, followed by the path to Osmosis.acgi. Because of the way Macintoshes split processing time between two applications on the same machine, better performance can often be achieved by running the web server and Osmosis.acgi on two different machines.

Line 2 is the SCRIPT name.

Line 3 sends the data, "mygraphic" to Helix as UserEntry0. It is used as a query value. You could also include more data or allow for user entered data.

LIne 4 is the link to the image. When clicked, it SUBMITS the <form> "mygraphic".

Line 5 closes the <form>.

You can see this demonstrated at: http://www.seabreeze-travel.de

 

webmaster@CommonGrnd.com