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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:24:13+00:00 2026-05-20T19:24:13+00:00

I make this call in my application.js file but it doesn’t seem to return

  • 0

I make this call in my application.js file but it doesn’t seem to return a dynamically generated embedded video from the link the user inputs:

$("#new_video").bind('submit', function(e){
        e.preventDefault();
        var q = $(this).find('#video_video_url').val();
        if (q == '')
            return false;

        $.embedly(q, {maxWidth: 500, wrapElement: 'div' }, function(oembed, dict){
            if (oembed == null)
                $(".video").html('<p class="text"> Not A Valid URL </p>');
            else 
                $(".video").html(oembed.code);
        })
    });

I’m not exactly sure what’s supposed to go where 'submit' is, so that may be whats causing me trouble.

My id of the form that the user inputs the url into is #new_video, the field’s id is #video_video_url, and the class video is generated from my video partial:

<%= div_for video do %>
<% end %>

This is rendered in my index view, where I’d like to display all the embedded videos. This is all there is in my index view where I want all the videos to be embedded:

<div id ='video_div'>
  <%= render @videos %>
</div>

however, it’s not working. No video is being embedded. What am I doing wrong? Bear in mind that I not only want to embed the video once the url is submitted, but I store the url and want to display the embedded videos indefinitely into the future.

Here’s the HTML of the form that the browser sees in the new view:

<div id="dialog" class="window" style="top: 237px; left: 435px; display: block; ">
<form accept-charset="UTF-8" action="/videos" class="new_video" id="new_video" method="post">
<div style="margin:0;padding:0;display:inline">
<input name="utf8" type="hidden" value="✓">
    <input name="authenticity_token" type="hidden" value="h/yzzD0lWsp7nc89WPmDRXWs5ahdfUc3ZvY5IukX2fQ=">
</div>
<div class="field">
   <label for="video_video_url">Video url</label><br>
   <input id="video_video_url" name="video[video_url]" size="30" type="text">
</div>
<div class="actions">
  <input id="video_submit" name="commit" type="submit" value="Create Video">
</div>
</form>
<a href="#" class="close">Cancel</a>
</div>

UPDATE:

I get this error in the console:

 Started GET "/jquery.embedly.js" for 127.0.0.1 at Thu Mar 17 00:09:29 -0700 2011

ActionController::RoutingError (No route matches "/jquery.embedly.js"):

 Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.0.4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.1ms)

I include jquery.embedly.js in my application layout though…

  • 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-20T19:24:14+00:00Added an answer on May 20, 2026 at 7:24 pm

    It looks like the error is that it’s not loading the Embedly jQuery script. Is that resolved? Alternatively you can load the Embedly jQuery script from our hosted http://scripts.embed.ly/jquery.embedly.js page.

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

Sidebar

Related Questions

I'm calling a SSIS package using LoadPackage(...). Is it possible to make this call
How is it that tools like this one can make an ajax style call
I seem to make this mistake every time I set up a new development
I've successfully built SDL from source using bcc 5.5.1 but any SDL test application
I make a distributed embedded application that will make use of several micro-controllers. The
How can I make this work? switch(property.PropertyType){ case typeof(Boolean): //doStuff break; case typeof(String): //doOtherStuff
Let's make this very easy. What I want: @array = qw/one two one/; my
Just to make this clear - what is the difference between: String(value) and value
How can I make this java generic cast ? public interface IField { }
I want to make this specialized w/o changing main. Is it possible to specialize

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.