JavaScript Hidden Field 1

The JavaScript on this page demonstrates how you can create your own JavaScripts to set up to 5 hidden fields. These "hidden" fields will be maintained during the customer's entire shopping session and eventually written to the order file. They will then be visable to the store owner when he/she uses the uShop Order Reader to securely read the final order from the server.

Note 1: These fields are identical to the 5 hidden fields that can be set via the uShopInitialize applet.

Note 2: In this example, the "setHiddenFields()" JavaScript is called via the page's "onLoad" function. You can setup your script to be called at any time and via any JavaScript event.


<SCRIPT LANGUAGE="Javascript">
function setHiddenFields()
   // As an example, set hidden field 1.
   document.uShopJSI.setHiddenExtra1("Example Hidden Field Value");

Note: Don't forget to add the uShopJSI applet to your page too:
<APPLET CODE="uShopJSI.class" CODEBASE="../classes/" NAME="uShopJSI" WIDTH="2" HEIGHT="2">

More Information:

For more information about creating and using your own JavaScripts with uShop, see uShop and Java Scripts.