formsjqueryjquery-mobilejquery-mobile-fieldset

jQuery mobile form submit without triggering page Naviagion


How can I navigate to a new page without triggering the jQuery mobile form handling, which creates a ajax request and then loads the page with it's speczial funcationallity (I don't know the name for it)


Solution

  • Add this attribute to the form:

    data-ajax="false"
    

    Example:

    <form action="demo.php" method="post" id="check-user" class="ui-body ui-body-a ui-corner-all" data-ajax="false">
        <fieldset>
            <div data-role="fieldcontain">
                <label for="username">Enter your username:</label>
                <input type="text" value="" name="username" id="username"/>
            </div>                                  
            <div data-role="fieldcontain">                                      
                <label for="password">Enter your password:</label>
                <input type="password" value="" name="password" id="password"/> 
            </div>
            <input type="button" data-theme="b" name="submit" id="submit" value="Submit">
        </fieldset>
    </form>