Menu
  • HOME
  • TAGS

PHP and Ajax posting

javascript,jquery,ajax,jquery-plugins,jquery-forms-plugin

What you could do, is alter your afterSuccess method a little bit. What I did was: function afterSuccess(text) { $('#output').prepend(text) $('#submitButton').prop('disabled', false); } The whole fiddle is available here The whole code of javascript: function afterSuccess(text) { $('#output').prepend(text) $('#submitButton').prop('disabled', false); } $(document).ready(function() { $('#submitButton').click(function(e) { $('#submitButton').prop('disabled', true); $('#SubmitForm').ajaxSubmit({ data: {...

Allow event propagation (bubbling) malsup

jquery,google-tag-manager,jquery-forms-plugin

This plugin doesn't actually submit a form. You'll need to add a bit of code to the .ajaxForm callback function to cause an event in GTM. Add the following line to your callback: dataLayer.push({'event': 'my_event_name'}); This will push an event to your dataLayer. You will also need a rule to...

Fine Uploader with form option questions

php,jquery,jquery-validate,fine-uploader,jquery-forms-plugin

Answering your questions in order: Fine Uploader sends each file in a separate request, and there is no way to change this. Fine Uploader already generates a unique ID (UUID) for each file. This ID is sent with the upload request. If you want to send additional data for a...

How to “stop” closing modal if form invalid

jquery,semantic-ui,jquery-forms-plugin

You can simply add a return false; in the modal's callback to prevent it from closing: $('.show-modal').click(function(e) { e.preventDefault(); $($(this).attr('data-modal-id')).modal('show',{ onApprove : function() { return false; //block the modal here } }); }); And once you're done, you can call $(theModal).modal('hide'); ...

bind ALL forms at once to jQuery Form possible?

jquery,forms,jquery-forms-plugin

You can bind a single event to a element parent to all desired forms: $("#parent").on('submit', 'form', function(){ $(this).ajaxSubmit(options); return false; }); In case you're using a jQuery version previous than 1.7, you can use: $("#parent").delegate('form', 'submit', function(){ $(this).ajaxSubmit(options); return false; }); ...