by
1
4
489k
9
Top 1% !
Popular
Pearl of Wisdom
Specified
Popularity: 1428th place

Published on:

No tags for this snippet yet.
LanguagePHP
LicenseMIT_X11
SourceGitHub
TechnologyAJAX

AJAX Request

AJAX Request: 
ajax.php
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/252453/AJAX-Request?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<script type="text/javascript"> $('form').submit(function () { $('form button').attr("disabled", "disabled"); $('#loading').fadeIn(); $('#msj').html(''); $.post('<?php echo Flight::base_url('contacto'); ?>', $('form').serializeArray(), function (d) { $('#loading').fadeOut(); $('form button').removeAttr('disabled'); $('#msj').html(d.msj); $('html, body').animate({scrollTop: $("#msj").offset().top}, 500); if (d.status === true) { $('form').slideUp(); } else { $('#captcha').attr('src','<?php echo Flight::base_url('captcha'); ?>?' + Math.random()); } }, 'json'); return false; }); </script>
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus