Search code examples
ajaxformsjquery-mobilesubmission

JQM (jQueryMobile) Problem with form submission returned page


I'm following the documentation from JQM on Submitting Forms and that part is working just fine. I can see the results page as in the example. (here is the form-sample-response.php page)

What my problem is:

I need to serve up another form and need the JQM functionality to work on the AJAX returned form. I have seen people say you need to add the rel="external" tag and I have done so to the page, form and button with no results.

I have even tried adding the jQuery functionality to the main form and still no go.


Solution

  • Well if someone else needs this:

    This goes in the main script;

    $('#page_name_here').live('pageshow',function(event, ui){
        alert('This page was just hidden: '+ ui.prevPage);
    
        // add you other functions here
    });
    

    And in the form submission returned page make sure you have a corresponding id