In article <94aca08d.0401090753.64bff64d@posting.google.com >,
javajonesk@hotmail.com (JSjones) writes:
[color=blue]
>
>Hi all,
>
>I'm new to these boards and my javascript experience is fairly limited
>and basic so please bear with me. Anyway, on to the question and some
>background. I'm developing using ColdFusion 4.5 and a good deal of the
>page processing depends on whether or not a control is defined. To
>prevent users from clicking on a submit button more than once or
>clicking on another submit button before the page has finished
>processing I have decided to use javascript to disable all of the
>submit buttons on the page. However, this is preventing submission of
>the form. When I try forcing the submit in the function, the
>processing that should occur from clicking the submit button is
>ignored and the submit button is not defined. Here is the code I am
>using the commented code is different things I have tried:[/color]
Please format your code for readability.
Instead of disabling the submit button, set a global variable and check its
state when the form tries to get submitted:
var submitForm = true;
function checkForm(){
if (submitForm){
//validation here
submitForm = false;
}
}
and anytime you need to "freeze" the page (stop the submit from working), set
submitForm to false, and when finished set it back to true.
--
Randy