how disable submitbutton with asp

J

JML

Hi guys,
I need HELP
I am trying to disable submit button after user submits the form.

thanks in advance




--
Jamal
Mpcparts.com / Milwaukeepc
414-3320874-143
414-332-1368
3900 N. Sherburn PL.
Shorewood,WI,53211
 
R

Ray at

You can't do it with ASP in the way that you mean, since ASP runs on the
server. To just disable the submit button, you can use client side code as
such:

<form onsubmit="this.NameOfSubmitButton.disabled=true;"

I don't know about browser compatibility of that though. INstead of trying
to disable the submit button, you could address the reason that you want to
do this and come up with a server-side solution. Like, have your code
handle duplicate submissions.

Ray at work



Hi guys,
I need HELP
I am trying to disable submit button after user submits the form.

thanks in advance




--
Jamal
Mpcparts.com / Milwaukeepc
414-3320874-143
414-332-1368
3900 N. Sherburn PL.
Shorewood,WI,53211
 
M

middletree

Good point. My follow-up would be, can you point me to some sample code for
handling double-submissions on the server side?
 
R

Ray at

Well, it all depends on what you're trying to avoid. What kind of data is
being submitted, and what do you want to prevent duplicates of? And how do
you define something as a duplicate? Like, if I entered Ray Costanzo into
your form, and then someone else with the same name also fills out your
form, that would not be a duplicate if we are different people. So, first
decide how you define duplicate entries, or double submissions.

Ray at work
 
J

Jamal AnJame

I am sorry I don't know how to make a client side script. Is there any
chance you can give me more information about this. Or could you direct
me to the resource.

thanks in advance.
JML
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,258
Messages
2,571,033
Members
48,768
Latest member
first4landlord

Latest Threads

Top