Stange behaviour with internet explorer


I’m developing an application with Rails 1.2.6 and I’ve facing a weird

In a form, I’m using link_to_function that is aggregating a :partial,
the code is as follows:

<%= render :partial => 'bonificacion', :collection => @convenio.bonificaciones %>
Marca Porcentaje Objetivo Mensual Destino
<%= link_to_function 'Agregar Bonificacion' do |page| page.insert_html :bottom, :bonificaciones, :partial =>'bonificacion', :object => end %>

The :partial’s code:

<% fields_for “convenio[bonificaciones_attributes]
[]”,bonificacion do |bonificacion_form| %>
bonificacion_form.collection_select :marca_id,@marcas, :alternate_id,
<%= bonificacion_form.text_field :porcentaje %>
<%= bonificacion_form.text_field :objetivo_mensual %>
<%= :destino,Bonificacion::DESTINO %>
<%= link_to_function
“Quitar”,"try{this.up(’.bonificacion’).remove()} catch(e) {alert(‘JS
  • + ‘\n’ + e.message); throw e}" %>

<%= link_to_function “this.up”, “try{this.up(1)} catch(e)
{alert(‘JS error\n’ + + ‘\n’ + e.message); throw e}” %>
<% end %>

The 1st link_to_function is using this.up(’.bonificacion’).remove()
working w/o any problem with firefox and opera but not with internet
Using try…catch and the alert found internet explorer doesn’t
recognize ‘this.up’ as a valid method, AFAIK is a prototype
(Element.up) method but can not understand the reason for error. I
used the second link_to_function serve to pinpoint the error to

Any help? recommendation? guidance?
If any additional information is required, pls ask me.

Thank you in advance.


Martín Trejo Chávez

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs