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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:04:00+00:00 2026-05-19T10:04:00+00:00

Alright, here’s the situation. I’ve got the Youtube API working to upload a video.

  • 0

Alright, here’s the situation.

I’ve got the Youtube API working to upload a video. Once it is uploaded, it returns http://example.com/?status=200&id=3-1234xyz.

Ideally, I’d like to have this submitted and uploaded via Ajax and then have the ID returned to immediately display on the page (that will eventually show the URL or embed code for the video). I’m using jquery, but I’m at my whits end with all of this. Any and all help, links, etc are greatly appreciated!

  • 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-19T10:04:01+00:00Added an answer on May 19, 2026 at 10:04 am

    Use an iframe. You simply post the file upload form into the iframe, when it’s then finished loading (you can capture this event with $(‘#iframe’).ready( … )) you can then capture the video id (cos it’s on the same domain).

    So your upload form will be along the following lines:

    <form action="...?nexturl=IFRAME_URL" method="post" enctype="multipart/form-data" target="uploader">
    <p>Please select the video you wish to upload to YouTube:</p>
    <input type="file" name="file" value="" />
    <input type="hidden" name="token" value="" />
    <button>Upload</button>
    </form>
    <iframe id="uploader" name="uploader" style="display: none; width: 1px; height: 1px; border: none;"></iframe>
    

    And then all your iframe needs to do is just pass the video id up to the parent (or you can read it from the parent, but I prefer the former):

    <!DOCTYPE html>
    <html>
    <head>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
        <script type="text/javascript">
        <!--
            var vars    = getVars();
    
            $( document ).ready( function()
            {
                parent.selectVideo( vars[ 'id' ] );
            });
    
            function getVars()
            {
                var vars = [];
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                var hash;
    
                for(var i = 0; i < hashes.length; i++)
                {
                    hash = hashes[i].split('=');
    
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
    
                return vars;
            }
        -->
        </script>
        <title></title>
    </head>
    <body>
    </body>
    

    And job done 😀

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

Sidebar

Related Questions

Alright, here is a link to the site I am working on. http://danberinger.com/preview.html I
Alright so here is my issue. I'm working a game engine that will eventually
I'm trying to generate ics-files, see sample here: http://deap.nu/myprogram.ics It validates alright here: https://icalendar.org/validator.html
Alright here's the situation, I have an application written in the Zend_Framework, that is
Alright, so here's the dealio: I'm working on a Ruby app that'll take data
Alright, so here is the situation... Say I have a navbar for a site,
Alright, so here's my basic ASP.NET page setup: I've got a page with a
Alright here the question. This is an example text Nokia 700<span>Stok Kodu: 389952</span> <br><span
Alright, so here is what I'm hoping for... Any request to this http://www.fileorchard.com/3451928347592 will
Alright so here it goes, I have my user system working perfectly, and now

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.