JQueryMobile registering vclick event handler 'sometimes' prevents default functionality
que 1: If a vlick event on a hyper link is called, is there any guarantee that the page change will occure as per the hyperlink ? if yes, here is my question:
I am registering a 'vclick' event handler in jquerymobile on a button and on an anchor tag. I have set ajax processing to false.
- <script>
- $(document).bind("pageinit", function(event, ui) {
- $('.show-page-loading-msg').bind('vclick', function() {
- $.mobile.loadingMessage = "Loading...";// "Approved";
- $.mobile.textOnly = false;
- $.mobile.showPageLoadingMsg();
- });
- });
- </script>
Now, Randomly things works fine for most of the times, but sometimes, all I see is loading message for infinite time and no default functionality of submitting form of submit button or not showing up new mobile page for anchor tag. Please notice, sometimes it works fine.
Markup:
- <form id="test" data-ajax="false" action="/test/login" method="post">
- <!--username password textboxes here-->
- <input class="show-page-loading-msg ui-btn-hidden" type="submit" value="Sign In" data-theme="e">
- <a class="show-page-loading-msg" href="/test/home" data-role="button" data-theme="d">Cancel</a>
- </form>
randomly submit button does not submit a form or sometimes
even anchor tag
does not show up the another page,
but they never fail to show loading message
.
Please notice I tried upgrading to 1.3.0 and used 'on' instead of 'bind' and also made necessary changes for loading message, but experienced the same results.