开发者

Submission button problems

开发者 https://www.devze.com 2023-03-20 14:35 出处:网络
I have program that reads in data and posts it in a list to edit it. Only one row of data can be edited at a time, so when that row is being edited, there is a submit button displayed in that row to p

I have program that reads in data and posts it in a list to edit it. Only one row of data can be edited at a time, so when that row is being edited, there is a submit button displayed in that row to post the data to another page and close out the editing for that row. The problem is that the submit button remembers how many times it has been clicked and runs through the submit function however many times it has been clicked. What's causing this and how can I fix it? I'm using jQuery and, unfortunately, have to have i开发者_Python百科t working in IE.


Code usually helps but this seems more along the lines of a design question. One way would be to write a basic script that disables the button after it has been clicked, thus preventing someone from being able to click on it more than once.

Here is something to try:

$('#myform').submit(function(){
$('input[type=submit]', this).attr('disabled', 'disabled');
});
0

精彩评论

暂无评论...
验证码 换一张
取 消