jQuery mobile form submit without triggering page Naviagion

165 views Asked by At

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)

1

There are 1 answers

0
Gajotres On BEST ANSWER

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>