rk**@att.net wrote:
I have an order form with about a hundred textboxes saying 0.
People change the zero to something else to tell quantity of field.
I am submitting page via asp and cdo.
Is there a function that detects changed text boxes and will only have
those submitted?
Here is address of page.
http://www.marioncountyfl.org/emsasupplies.htm
I dont want all the non-ordered items showing up in submissal. Thanks!
Create an onsubmit function that disables all the text inputs that have
a value of '0' - disabled elements are not successful and should not be
submitted by the browser.
Any browser with JavaScript disabled (or without javascript at all)
will submit all the fields regardless. A sample script that will also
disable any empty text element (value = '') is below:
<form name="strBody" onsubmit="disableZeros(this);" ... >
...
</form>
<script type="text/javascript">
function disableZeros(f){
var els = f.elements;
var i=0;
var el = els[i];
do {
if ('text'==el.type && 0==el.value) el.disabled = true;
} while ( el = els[++i] )
}
</script>
--
Rob