Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function() {
- jQuery('#form-cliente-unaccon').submit(function() {
- // show loader [optional line]
- $('#msgs').html('Enviando....').fadeIn();
- if (document.getElementById('upload_frames') == null) {
- // create iframe
- $('body').append('<iframe id="upload_frames" name="upload_frames"></iframe>');
- $('#upload_frames').on('load', function() {
- if ($(this).contents()[0].location.href.match($(this).parent('form').attr('action'))) {
- $('#server_responses').html($(this).contents().find('html').html());
- $('#msgs').hide();
- }
- })
- $(this).attr('method', 'post');
- $(this).attr('enctype', 'multipart/form-data');
- $(this).attr('target', 'upload_frames').submit();
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement