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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:06:33+00:00 2026-05-23T09:06:33+00:00

I replaced Prototype with JQuery for Rails 3. I am now trying to do

  • 0

I replaced Prototype with JQuery for Rails 3.
I am now trying to do the following:


  #photo
    =render 'shared/photo'
  = link_to_function "Add a Photo" do |page| |
      page.insert_html :bottom, 'photo', :partial => 'shared/photo', :object => Photo.new |
    end |

So the Javascript generated is:



try {
    Element.insert("photo", {
        bottom: "Data\n\n"
    });
} catch (e) {
    alert('RJS error:\n\n' + e.toString());
    alert('Element.insert(\"photo\", { bottom: \"Data\\n\\n\" });');
    throw e
};
return false;

In the rails docs insert_html is a Prototype helper, but I thought that replacing Rails.js with the https://github.com/rails/jquery-ujs would replace this helpers for JQuery helpers. I get a TypeError.ElementInsert is not a function.

Am I doing something wrong ? Or am I going to do this myself without the helpers ?

  • 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-23T09:06:34+00:00Added an answer on May 23, 2026 at 9:06 am

    Someone just sent this question to me, maybe I can help. I’m on the jquery-ujs/jquery-rails team.

    Unlike prototype-ujs for rails, jquery-ujs does not come bundled with rjs support. There is a separate gem that provides that functionality called jrails.

    We’ve talked about merging the two projects, but decided to keep them separate, as it’s more flexible that way.

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

Sidebar

Related Questions

I'm using the following jQuery plug-in to automatically add commas to a number. The
In a Rails application using prototype, I have the following (simplified) code in my
i work with page using prototype, and i have to add some ajax requests,
Please help to replace these jQuery functions with Prototype ones: $(button,input,label,select,textarea).bind('mouseover mouseout', function(){$(this).toggleClass('hover')}); $(button,input,select,textarea).bind('focus
Here is my query (I replaced table names with generic ones). I am trying
I am using jQuery ui in a rails application. I want to load content
In our current prototype most the standard HTML controls are replaced by an applet,
I'm creating my first rails app, and using the standard prototype library for some
I'm trying (still) to get ajaxful-rating to work with my rails installation. I did
I'm trying to assign a function to Object.prototype.equals similar to what's done in Object

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.