Halaman

9/15/2009

Submit Form Inside Facebox

We often use a submit form progress in our web project, but in facebox , how to do it ? if we use a facebox popup and we click on any area then the facebox will close it self and back to default page.  Are we can use the facebox to submitting form and the result be display in facebox ? the answer is Yes.. it can.


With the AjaxForm function, we can do it. Please see the example script below : 

<script type="text/javascript">

$(document).ready(function() {

$('#submitform').ajaxForm({

target: '#contactform',

success: function() {

$('#contactform').fadeIn('slow');

}

});

});

</script>

#submitform is id from form that used to send a value and #contactform is id from div, where if we click the button submit, the new page will be loaded to div.

Tidak ada komentar:

Posting Komentar