used to enhance the appearance of HTML pages served by the Coyote web server.
These methods are not really unique to Coyote, but are often used in the
day to day data entry applications that Coyote is ideal for.
to a number of excellent web sites that post this information. The site
that Modular Software uses is:
they seem to share some syntax styles, are completely seperate and independent
programming languages. Java is a compiled full-function language
that can be used for applications that range from video games to cruise
functionality of HTML in a web browser environment.
tags as in:
The <!-- and // --> characters delimit HTML comments. It is thus
section within a program.
code, and you can define in-line code that is executed when the page is
loaded. You define a function in a manner similar to:
outside of functions:
for other HTML elements. This allows you to do things like submit
a form when a user clicks on a hypertext link, change the graphics that
are displayed when the mouse is over a picture, or reload the page after
a certain amount of time has expired. The specifics of these actions
are beyond the scope of this introduction, but the general format of a
Some Simple Functions
When you write applications with the mv/Web generator, you must insure
that your application always keeps control of the processing that is occuring.
to cause the browser to submit the page whenever a hypetext link is followed.
This is the HTML source code that is required for this operation:
Using Hypertext Links to Submit Forms
There are several parts to this example:
document.forms.SELID.value = x
<input type="hidden" name="SELID">
<p><a href="1234" onclick="return SubmitFn('1234')">link 1234</a></p>
<p><a href="5678" onclick="return SubmitFn('5678')">link 5678</a></p>
example. This function will be called whenever a user clicks on a
hypertext link that has an onclick event that refers to this functions.
It is the responsibility of this function to set a variable to the selection
ID value and to submit the form. The function also returns false
so that the onclick reference will fail and the hypertext link will also
fail allowing the form to be submitted.
This function can actually exist anywhere in the HTML source code. The
after the <body> tag.
Setting up the page <form>
The page must contain a standard HTML form construct with a <form ...>
and </form> tag. It is usually best to surround the entire body
of your page with these structures so that all elements are inside of the
Setting up a hidden input field
Next, you need to create a hidden input field (called SELID in this example)
that will be used to contain the "value" of the link that is selected.
When the page is submitted back to the Coyote web server, you can use:
to retrieve the value of this variable so that your program can sense which
link was followed.
PL_GETVAR variable from 'SELID' else variable = ''
Setting up hyperlinks that will submit the form
The final step is to attach an "onclick" action to a standard hyperlink.
to execute whenever the user clicks the hyperlink. This will then
cause the page to submit and return "false" which will cause the standard
hypertext link to not be followed. The contents of the href="..."
tag is actually not processed in this case, but you should probably include
the link value so that the user will see a reasonable link at the bottom
of the page when the mouse is over the link.
Summary of Using HyperLinks as Submit Elements
This example is a very small example of how to use hyperlinks to cause
at the top of the page, you can then include as many submit hyperlinks
as you wish within the page body.
© Copyright 1996-1998 Modular Software
Corporation.All rights Reserved.