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 7977765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:18:06+00:00 2026-06-04T09:18:06+00:00

I am fetching Google in a gadget using this code: <html> <head> <title>Browser</title> </head>

  • 0

I am fetching Google in a gadget using this code:

<html>
<head>
<title>Browser</title>
</head>
<body onload= "getListCollection()" style="width:900px; height:900px;" >
<div id="listAttributes" style="width:400px; height:400px;" ></div>
<script>

function getListCollection() {
    var url = "https://www.google.co.uk"  
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open('GET',url,true, 'user', 'password');
    xmlhttp.onreadystatechange = function()
    {
        if(xmlhttp.readyState == 4);
        {
            document.getElementById("listAttributes").innerHTML = xmlhttp.responseText
        }
    }
    xmlhttp.send(null);
}
</script>
</body>
</html>

I wonder how can I do the same thing using $ajax?

I looked at different examples but I don’t know how they gonna fit in this situation. Or if you can post some nice $ajax tutorials please.

When I change it to this, it doesn’t work:

<html>
<head>
<title>Browser</title>
</head>
<body onload= "getListCollection()" style="width:900px; height:900px;" >
<div id="listAttributes" style="width:400px; height:400px;" ></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js">

$.ajax({
    url : 'https://www.google.co.uk',
    type : 'GET',
    success : function(data){
        $('#listAttributes').html(data);
    }
});
</script>
</body>
</html>

Nothing comes up on the page.

  • 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-04T09:18:07+00:00Added an answer on June 4, 2026 at 9:18 am

    Here’s a jQuery version of the code:

    $.ajax({
        url : 'https://www.google.co.uk', //cross-domain? this won't work
        username : 'user',
        password : 'password',
        type : 'GET', //default is GET, but i put it here to clarify
        success : function(data){
            $('#listAttributes').html(data);
        }
    });
    

    For more details and settings, read the jQuery.ajax() documentation

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

Sidebar

Related Questions

On Google App Engine I found this code that is fetching a web page's
I am using google contact data objective c APIs for fetching contacts. I got
I'm fetching some line charts using Google's Chart API and placing it in a
I paste google map code <iframe width=186 height=186 frameborder=0 scrolling=no marginheight=0 marginwidth=0 src=http://maps.google.com/maps?f=d&source=s_d&saddr=NIPA,+Karachi,+Pakistan&daddr=&hl=en&geocode=FXg3fAEd6dH_AyF_rsIkOA6mpg&aq=&sll=24.91788,67.097065&sspn=0.007414,0.009645&vpsrc=0&mra=ls&ie=UTF8&t=m&ll=24.91788,67.097065&spn=0.007414,0.009645&output=embed></iframe> <br
Hie I am generated html documents using a google text doc as template (reading
I'm fetching some data from an MSSQL table using the mssql_fetch_object, but the text
I am currently asynchronously fetching json documents to update elements in a few html
I have tried fetching MySQL query results using mysql_fetch_row() and mysql_result() and numeric values
I am fetching the current date & time using NOW() in mysql. I want
how to get size of entity in google app engine without fetching the entity

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.