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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:02:18+00:00 2026-05-31T19:02:18+00:00

the url is input by end users as string on my page, so may

  • 0

the url is input by end users as string on my page, so may point to any domains.

JavaScript in current page needs to sniff the url, verify whether it’s still valid, and return the types as image, or video, or audio, even considering html5 video audio tag and existent flash embed. And No need to wait for the complete file transfer.

Can someone help, from concept? thanks very much.

i’m aware the cross domain problem on ajax. So no idea on basic how-to.

  • 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-31T19:02:19+00:00Added an answer on May 31, 2026 at 7:02 pm

    If what you’re asking, is:

    Given any URL -> lookup given URL using a javascript ajax request, and determine if it is a video/audio/image – then, once detected, use the URL accordingly, then you can do something like this:

    jQuery and AJAX response header

    However, you’ll not be able to make a request using client-side JavaScript to another domain, as it will require a cross-domain request (where your alternatives are JsonP, or weird headers in the response).

    You’re better off passing the URL to your own server, and performing the logic there (Via some kind of server-side web request) and passing a payload back to the client, with the required information in JSON or something – e.g.

    {payload: 'video'}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a user input string to create a url and I only
I am parsing data from this XML url The text input varies, depending on
For example Input <url wiki=https://wiki.archlinux.org/index.php/Main_Page forums=https://bbs.archlinux.org/> Desired output <url wiki=https://wiki.archlinux.org/index.php/Main_Page forums=https://bbs.archlinux.org/> Here's a sample
When a users visits my home page and they click the log in button
I am trying to make it easy form my end users to search through
this is action url: http://localhost/carsdirectory/users/dashboard . dashboad.ctp (i have select filed and in this
I have the following code: <?php echo $form->create('User', array('url' => array('controller' => 'users', 'action'
the javascript below replaces this value http://www.google.co.uk/webhp?hl=en with http://link-ads.blogspot.com/?url=http%3A%2F%2Fwww.google.co.uk%2Fwebhp%3Fhl%3Den on input entry. <script type=text/javascript>
my view: <form action=<?=base_url()?>index.php/frontend/main_con/temp> <input type=text name=temp> <input type=submit/> </form> Controller: function temp(){ echo
this is my HTML: <?php echo form_open(base_url().'admin'); ?> <div class=row username> <span class=icon></span> <input

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.