Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First, I have read through all the

Status
Not open for further replies.

cglinn

Programmer
Sep 3, 2003
44
US
First, I have read through all the submitions in these forums related to my problem and none of the solutions have worked.

With that being said:

I am currently using Javascript to run validation on the submition of a form once a "Save" button is clicked. I would like to disable the button upon it's first click. The problem is that it is a design-time control object, which uses an Image for the button. I can do exactly what I want with a normal design-time control button (one which doesn't use an image). I have tried the solution which increments a variable and if it is greater than 1, then it cancels the event. However, it also cancels the first click event -- not a good thing.

Anyone have a solution that will work for me?

Thanks.

 
>> I would like to disable the button upon it's first click.

Is that before or after the form is submitted? Or perhaps only if the validation fails and therefore the form is not submitted? There are probably more possibilities eh?

>> then it cancels the event

cancels what event?

>> The problem is that it is a design-time control object,

Does that mean your using some server side environment and server side processing? If so, it might be helpful to know what environment it is. Of course if you have to shoot me after you tell me I would rather not know. [wink]




-pete
 
>> Is that before or after the form is submitted? Or perhaps only if the validation fails and therefore the form is not submitted? There are probably more possibilities eh?

I want the button disabled after it is clicked, but if validation fails, it should become enabled again so the user can make the necessary changes and try submitting again.

>>cancels what event?

the onclick event

>>Does that mean your using some server side environment and server side processing? If so, it might be helpful to know what environment it is. Of course if you have to shoot me after you tell me I would rather not know.

Sorry about that. I am using ASP/VBScript along with RemoteScripting to call the Javascript validation.

I hope this is enough info! :)
 
>> I hope this is enough info!

It might be if I understand correctly. So you use remote scripting to execute validation code on the server and you want the button disabled while waiting for the remote call to return? Then if the call returns false or whatever indicating (invalid) you want to not submit the form and re-enable the button.

If that is an accurate description you need to explain the processing of the remote call in the client script and post the code relevant to making that remote call to the server for validation If it is not accurate then we are still at square zero.


-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top