Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:24:53+00:00 2026-06-04T22:24:53+00:00

here is my problem, i call this method and what it does is post

  • 0

here is my problem, i call this method and what it does is

post some data on server using jQuery, i want to display page using result i recieve from server and quick thing
loginSubmit() calls loginPostData ,loginSubmit make a json object and pass it to loginPostData

here is the piece of code from javascript

function loginPostData(jsonRequest)
{
    $.post("http://localhost:8080/edserve/MobileServlet", 
            JSON.stringify( jsonRequest), 
            function(data) 
            {
                var obj = JSON.stringify(data);
                //var object = JSON.parse(json_text);
                //alert(obj);
                alert(obj);
                if(data.status=="success")
                {
                    //display main page
                                  //$('#mainMenu').show(); <-- this does not give desired result
                }
                else
                {
                    if(data.message=="user not verified")
                    {
                        //display verification page
                    }   
                    if(data.message=="no user exist with this usname")
                    {
                        //set focus to username
                        $("#username").focus();
                    }   
                }   
        }, "json");
}

and the page structure is like this

<div data-role="page" id="login">
    // other page content
            <div id="divrightButton">

            <!-- calling loginSubmit which calls loginPostData-->   
            <a class="bluebutton" href="#" onclick="loginSubmit(); return false;">Login</a>

            </div>
        </form>
</div>

<!--main page-->
<div data-role="page" id="mainMenu">

     Main menu
</div>

HOW TO SHOW MAIN MENU WHEN THERE IS SUCCESS,
the entire code of html is in single file in different div’s

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:24:55+00:00Added an answer on June 4, 2026 at 10:24 pm

    use this code to redirect/display the particular div element

    $.mobile.changePage("#mainMenu",{allowSamePageTransition: true });

    and also download following css file, its a must for transitioning between pages/div elements

    jquery.mobile.transitions.css

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is my problem, i call this method and what it does is post
I call addNotify() method in class that I posted here. The problem is, that
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
my problem here that i don't understand how does the method called objectchanger works
Here is my problem. If I use only one Windows Forms project and call
Super weird problem here. I'm having trouble getting jQuery to bind any selectors except
enter code here My problem is this: in this database the junction table contains
I'm using Rails with jQuery, and I'm working on a page for a simple
In our web-app we are using Launcher to call some command line functions (not
I want to call a C subroutine from Java. I'm using JNI. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.