Hi,
I've got a jquery function that slides the page to the top of the browser window.
I wanto to call this function onSubmit, so that the page slides top before the form after the validation, but before the data is submited and the page reloaded to show the submission message.
How can I do this?
Thanks in advance
I've got a jquery function that slides the page to the top of the browser window.
I wanto to call this function onSubmit, so that the page slides top before the form after the validation, but before the data is submited and the page reloaded to show the submission message.
How can I do this?
Thanks in advance
* I want to call this function onSubmit, so that the page slides top after the validation, but before the data is submited and the page reloaded to show the message.
sorry for my bad english!
sorry for my bad english!
Hi mauriciocgpereira,
I was testing this for some Google Analytics last week and I was unable to find a way of triggering an event in CFv5 after validation and before submission ;-(
Hopefully Max will add an onSuccess event to the validation script in a future release.
Bob
I was testing this for some Google Analytics last week and I was unable to find a way of triggering an event in CFv5 after validation and before submission ;-(
Hopefully Max will add an onSuccess event to the validation script in a future release.
Bob
Thanks :-)
And I can I call a jquery function onSubmit?
Thanks
And I can I call a jquery function onSubmit?
Thanks
Hi mauriciocgpereira,
Yes - but I think that it will run before the validation, not after it.
Bob
Yes - but I think that it will run before the validation, not after it.
Bob
No problem!
How can I do that?
How can I do that?
Hi mauriciocgpereira,
It will be something like this in a Load JS action in your form on Load event:
Bob
It will be something like this in a Load JS action in your form on Load event:
jQuery(document).ready(function (jQ) {
jQ('#your_form_id').on('submit', function(el){
// some script here
});
});
Note, this is set up to use jQ in place of $ in the JQuery script.
Bob
Can't see how to put this to work
Here is the function:
At this first stage I only want to detect the href and display it in a alert box.
Should I put anything in the JS Files field?
Thanks in advance
Here is the function:
jQuery(document).ready(function (jQ) {
jQ('#chronoform-newsletter-form').on('submit', function(el){
var href = jQuery(this).attr("href");
alert(href);
});
});
At this first stage I only want to detect the href and display it in a alert box.
Should I put anything in the JS Files field?
Thanks in advance
This topic is locked and no more replies can be posted.