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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:30:59+00:00 2026-05-15T16:30:59+00:00

I have a static html page weather.html <html xmlns=http://www.w3.org/1999/xhtml> <head> <title></title> <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js></script>

  • 0

I have a static html page weather.html

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $.ajax({
                type: "GET",
                url: "http://www.google.com/ig/api?weather=Delhi",
                dataType: "xml",
                success: parseXml
            });
        });
        function parseXml(xml) {
           $(xml).find("weather").each(function() {
            alert($(this).attr("temp_c"));
            });
       }
    </script>
</head>
<body>

</body>
</html>

The alert doesn’t seem to get displayed in the page when i inspected trough firebug i found this,

XML Parsing Error: no element found Location: moz-nullprincipal:{08ba4230-2feb-48d3-969e-b53579b07b52} Line Number 1, Column 1:
^

also function parseXml doesn’t seem to get called…

  • 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-15T16:30:59+00:00Added an answer on May 15, 2026 at 4:30 pm

    You cannot access distant domains using AJAX. See Same Origin Policy. You are trying to access a script located on google.com, so unless this is page is on hosted on this same domain it won’t work. The only way to make this work is to setup a proxy server script on your server to which you will send the AJAX call and it will delegate the call to google.com. Another alternative is to use JSONP but the distant script needs to support it.

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

Sidebar

Related Questions

I have HTML which includes scripts in following order <script src=../static/js/jquery.js type=text/javascript> <script src=../static/js/bootstrap.js
Possible Duplicate: opposite of <noscript> I have a static html page as following: <head>
I have 2 pages, a static html page and a python script - hosted
I have a jQuery scrollbar in a static html page. The code works fine
I have an e-mail template which is just a plain, static HTML page. I
Lets take a static html page as a scenario, lets say you have a
I have a static html web page for my website and recently was not
I have two servlets 'ExtensionServlet' and 'PatternServlet' and a static html page. The HTML
I have a static HTML web page and I want to set its status
I have an html static page as well as a url of html web

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.