Mal's E-commerce script examples
It is assumed that you know how to format a Mal's-E form - use the help pages at Mal's E-Commerce if not
Three different quantity/order methods are also presented, but are not exclusive to the options they are shown with
You may also omit the - Choose - entry on the others, or add it to the last, just be careful to keep the price values in step.
You could generate a page with a form in OPTION 4 method, and in the header, you place a script to direct you to a second page using OPTION 3 -
location.href = "page_scripted.htm"
How it works
The "onChange" sets the index (position) of the price list to match the Product whenever it is changed
The "onFocus" pushes the select back to the product, so the price cannot be changed
A trick here is that the warning displayed by ALERT prevents double-clicks from breaking through, otherwise the same function must be applied to "onDblClick" as well.
The second example shows the use of an ARRAY to provide values for a TEXT or HIDDEN field.
This code fragment may be freely used, or added to Mal's archives if desired.
Please note - while I have used "THIS" and "THIS.FORM" to eliminate the form name, the field name does appear, so do not copy the code to multiple fields without editing - tattoo this on your brain, or YOU WILL FORGET!
And Finally - No attempt has been made to format things neatly - the form doesn't even have a submit button.
This is example code only, no liability accepted for any defect, malfunction, damage, pestilence, famine, war or any other matter arising or not from it's use.