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

  • SEARCH
  • Home
  • 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 7649501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:58:57+00:00 2026-05-31T10:58:57+00:00

I want redirect my getJSON response to another html page below is the code

  • 0

I want redirect my getJSON response to another html page below is the code for both the htmls

index.html

$(document).ready(function() {
alert("load");
    $.getJSON("http://10.0.2.2:8080v1/service/26/1",
  function(data) { //want to redirect this response display.html
     $.each(data, function(id, obj){ 
            $.each(obj, function(propName, value){
               // console.log(propName + ": " + value);
                alert("propName: "+propName+" value: "+value);
            });
        });


    }); 

    document.addEventListener("deviceready", onDeviceReady, true);

 });

 function onDeviceReady(){
     navigator.notification.alert("PhoneGap is working");

 } 

</script>

</head> 
<body> 

</body>
</html>

display.html

In this I have code to display the response data in the form of table. Can you help me out now on how to send the getJSON response to display.html and use in this

      <body>
     <table width="100%" cellspacing="3">
        <tr align="center">
        <td bgcolor="#474646" style="color: #fff; >first column</td>
        <td bgcolor="#474646" style="color: #fff; >second column</td>
        <td bgcolor="#474646" style="color: #fff; >third column</td>

       </tr>
       <tr align="center">
        <td>firstcolumn</td>
        <td>secondcolumn</td>
        <td>thirdcolumn</td>
        </tr>
      </table>

   </body>
  • 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-05-31T10:58:58+00:00Added an answer on May 31, 2026 at 10:58 am

    Do you mean that you want to redirect your page to display.htm once your getJSON has completed? If so, try this:

    $.getJSON("http://10.0.2.2:8080v1/service/26/1",
      function(data) { 
         window.location = "display.html";
    }); 
    

    Also, it looks like your URL is incorrectly formatted. I think that you are missing a “/” before “v1” so that it should look like this “http://10.0.2.2:8080/v1/service/26/1”

    EDIT:

    From your comments, it sounds like you just want to load the contents of display.html into the body of index.html. If that is the case, I don’t think you want to use getJSON, I think you just want ‘load’ see below.

    <script type="text/javascript">
        $(document).ready(function() {
            alert("load");
            $('#someDiv').load('display.html');
            document.addEventListener("deviceready", onDeviceReady, true);
        });
    </script>
    <body>
        <div id='someDiv'></div>
    </body>
    

    Make sure that you get the path to display.htm correct.

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

Sidebar

Related Questions

I want to redirect all requests for index.html|php|php5 to http://www.domain.co.uk/ using mod_rewrite and I've
I want to redirect to another page using Server.Transfer and I have this simple
I want to redirect a response to another URL while it contains some POST
I want redirect to error page when exception occured. If the code is not
I want to redirect to a page that and force https: e.g Response.Redirect(~/Login.aspx); I
I want to redirect from one page to another page in ASP.NET MVC 3.0
I want to redirect users to an error page if they enter any URL
i want to redirect peaple who goes in my site to other page if
I Have done a site but want to redirect it to another subdomain in
Iam working on Ubuntu.(Linux) I want to redirect from the page one.php to two.php,

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.