Hi,
On a form my validation is done through the onclick event of a button
function EW_checkMyForm
this works fine - but i have an issue of impatient clickers so, to keep it simple i want an alert to popup
and say 'click once' - this would give the page time to submit [may be annoying for user - but stops the record being written twice!]
the process of events would then be
1) Button clicked
2) function EW_checkMyForm run to make sure x_stockreg field filled - if not return false
3) if x_stockreg filled then submit form with a value for A
4) alert saying click once
i dont think i can do all this without writing a new function but have limited experience and would really appreciate your help.
if i am not making sense please let me know.
thanks MG
On a form my validation is done through the onclick event of a button
Code:
onclick="this.form.a.value='A';return EW_checkMyForm(this.form);"
function EW_checkMyForm
Code:
function EW_checkMyForm(EW_this) {
if (EW_this.x_stockreg && !EW_hasValue(EW_this.x_stockreg, "TEXT" )) {
if (!EW_onError(EW_this, EW_this.x_stockreg, "TEXT", ">Please Enter Car Reg..."))
return false;
}
return true;
}
this works fine - but i have an issue of impatient clickers so, to keep it simple i want an alert to popup
and say 'click once' - this would give the page time to submit [may be annoying for user - but stops the record being written twice!]
the process of events would then be
1) Button clicked
2) function EW_checkMyForm run to make sure x_stockreg field filled - if not return false
3) if x_stockreg filled then submit form with a value for A
4) alert saying click once
i dont think i can do all this without writing a new function but have limited experience and would really appreciate your help.
if i am not making sense please let me know.
thanks MG