2

I'm doing login form which looks like:

<head> 
    <script src="http://code.jquery.com/jquery-1.5.min.js"></script>
    <script src="../sp/jqm/jquery.mobile.js"></script>
    <script type="text/javascript">
    $(document).bind("mobileinit", function(){
        $.extend(  $.mobile , {
            ajaxFormsEnabled: false,
            ajaxEnabled: true
        });
    });

    </script>
    <link rel="stylesheet" href="../sp/jqm/jquery.mobile.min.css" />
</head>
<body>
    <div data-role="page" data-theme="b"> 
        <div data-role="header">
            <h1>Login</h1>
        </div> 
        <div data-role="content">
            <form action="login_act.asp" method="POST" id="frm_prijava" name="frm_prijava">
                <div data-role="fieldcontain">
                    <label for="username"> User name:</label>
                    <input type="text" name="username" id="username" value=""  />
                    <label for="pass">Password:</label>
                    <input type="password" name="pass" id="pass" value=""  />
                    <input type="submit" name="sbm" id="sbm" data-role="button" value="Enter" /> 
                </div>
            </form>
        </div> 
    </div> 
</body>

When i try to submit form, dialog pops up and nothing happens... it just loads the page...

how can I submit this form without ajax?

1
  • 1
    I don't think that AJAX is turned on or managed by default. Please send us more code. Commented Mar 14, 2011 at 15:29

1 Answer 1

1

Try executing your mobileinit event before jQuery Mobile is loaded

The mobileinit event is triggered immediately upon execution, you'll need to bind your event handler before jQuery Mobile is loaded.

Cheers

Sign up to request clarification or add additional context in comments.

1 Comment

Never mind, I figured it out... the problem was with the page that I was loading...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.