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

The Archive Base Latest Questions

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

On page load, I’m making two AJAX requests: one to pull the newest video

  • 0

On page load, I’m making two AJAX requests: one to pull the newest video from a Youtube channel, and one to pull the newest post from a blog. Both scripts work correctly.

For whatever reason, I haven’t been able to test it in any browser (Chrome, Firefox, Safari, and Opera). Is the request too big? I’ve been running into issues with CORS support (at least that’s what I think is going on) while using Chrome, so the blog request isn’t working there and completely offsets the video request (it doesn’t work).

Here’s the error I get in the Javascript Dev Console in Chrome:

XMLHttpRequest cannot load http://devingraham.blogspot.com/rss.xml. Origin null is not allowed by Access-Control-Allow-Origin.

If I change…

var tmp = $(this).find("content:first").text();

…to just find the “title:first” instead, it renders fine in Safari without freezing. If I keep it at content and load the page, I can see the post loads in just fine, but the page freezes and won’t load the video. So perhaps it’s just too much? I know for a fact that the post I’m pulling is quite long, but it seems silly that it would cause any issues. So do you have any ideas?

Here’s the script:

<script type="text/javascript" charset="utf-8">

    $(function() {
          $.ajax({
            type: "GET",
            url: "http://gdata.youtube.com/feeds/base/users/devinsupertramp/uploads?orderby=updated&alt=rss&client=ytapi-youtube-rss-redirect&v=2",
            dataType: "xml",
            success: parseVideo
          });
          $.ajax({
            type: "GET",
            url: "http://devingraham.blogspot.com/rss.xml",
            dataType: "xml",
            success: parseBlog
          });
    });

    function parseVideo(xml) {
        $(xml).find("item:first").each(
            function() {
                var tmp = $(this).find("link:first").text();
                tmp = tmp.replace("http://www.youtube.com/watch?v=", "");
                tmp = tmp.replace("&feature=youtube_gdata", "");
                tmp2 = "http://www.youtube.com/embed/" + tmp + "?autoplay=1&controls=0&rel=0&showinfo=0&autohide=1";
                var iframe = $("#ytplayer");
                $(iframe).attr('src', tmp2);
            }
        );
    }

    function parseBlog(xml) {
        $(xml).find("entry:first").each(
            function() {
                var tmp = $(this).find("content:first").text();
                var post = $("#blog");
                post.append(tmp);
            }
        );
    }
</script>
  • 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-04T07:04:29+00:00Added an answer on June 4, 2026 at 7:04 am

    By default, you cannot make cross-domain AJAX requests because of the Same Origin Policy.

    You can get around this, but it requires the cooperation of the site on the other domain to explicitly allow this type of request.

    See: Ways to circumvent the same-origin policy

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

Sidebar

Related Questions

Hello on page load we get two buttons while clicking on 1st button one
Here on page load i am trying to store the values from form to
On page load, I'm loading an html page through jquery ajax. This html page
Every web page load from top to bottom means first my header will be
I want to calculate the page load time; This means from second 0 (a
We want to capture the page load times from server to client and not
I wish a page to fully load before issuing an ajax call to update
I'm having trouble making the page load the controller I want it too. For
I've a page load some contents by Ajax, and also bind events via .on()
Is Page.Load the earliest point in the Page.Load life cycle to add Response.AppendHeader?

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.