javascript - How can I use jquery to save my form data then load it in fancybox to preview the changes -


i have form several fields has jquery autosave function saves form every 3 minutes, , button user can click save form. want preview feature loads in fancybox. currently, when click preview button, fancybox loads using iframe , pulls data php/mysql process. preview in fancybox loads, if form has changes since last save, , hasn't been saved since recent changes, fancybox displays data prior latest changes.

$(function() {     $('#preview-article').live('click', function() {         savetheform();         $('#preview-article').fancybox({             'width': '80%',             'height': '80%',             'autoscale': false,             'transitionin': 'none',             'transitionout': 'none',             'type': 'iframe'         });     }); }); 

any appreciated!!!

i found api option included fancybox called onstart able add savetheform function. onstart option called right before attempting load content. far, it's working.

$(document).ready(function() {     $('#preview-article').fancybox({             'onstart': savetheform,             'width': '80%',             'height': '80%',             'autoscale': false,             'transitionin': 'none',             'transitionout': 'none',             'type': 'iframe'     }); }); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -