• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Run Javascript after form successfuly submitted

Run Javascript after form successfuly submitted 12 years 9 months ago #17938

I'm trying to run some javascript (Jquery) after the form has been submitted, and prevent the submission until i finish the jquery code.

Here's what I have, but it does this code even if the form validation fails. Can any body help me?
$('form').submit(function (e) {
	var i = -1;
    var form = this;
    e.preventDefault();
    setTimeout(function () {
        form.submit();
    }, 1000); // form submit delay in milliseconds
	$('form')
		.hide(1000)
		.animate({height: 75+'px'}, 500)
		.animate({width: 0+'px'}, 500, function(){$(this).css('z-index', i);
		i--;
	;})
})
Last Edit: 12 years 9 months ago by jason.hill.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!