65 Posts
raz
9 years ago
5
Topic

Hi
when users submit a form , I'd like to disable submit button to Prevent user from clicking submit button again and again in slow connection
or users see a message "please wait" until the form is saved compeletly

Thanks

Get a VIP membership
9 years ago
2
Level 1

Hello raz,

Try to use this on the submit Button: http://www.the-art-of-web.com/javascript/doublesubmit/

regards,

Elisa

65 Posts
raz
9 years ago
1
Level 2

Thanks for your reply,

Do I need to buy any plugin to add jquery code to page or I can add it manually?

9 years ago
0
Level 3

You can use this: http://www.seblod.com/products/1854 or doing an override on your form :)

Regards,

Elisa

65 Posts
raz
8 years ago
1
Level 1

Hi

I have this plugin

Based on your tutorial I must add this code

onsubmit="return checkForm(this);"

to the form tag, 

I don't know how can I do this.

65 Posts
raz
8 years ago
0
Level 2

I used this code to add attribute to form:

var $j = jQuery.noConflict(true);
$j(document).ready(function(){

$j( "form" ).attr( "onsubmit", "if(submitting) {alert('The form is being submitted, please wait a moment...');button_save_close.disabled = true;return false;} else if(checkForm(this)) {button_save_close.value = 'Submitting form...';submitting = true;return true;} else {return false;}" );
});

But  it doesn't work and make that form don't save at all.

Get a VIP membership