Stange behaviour with internet explorer

Hi!

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

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 => Bonificacion.new end %>

The :partial’s code:

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

  • e.name + ‘\n’ + e.message); throw e}" %>
    <%= link_to_function “this.up”, “try{this.up(1)} catch(e)
    {alert(‘JS error\n’ + e.name + ‘\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
explorer.
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
Element.up

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

Thank you in advance.

Saludos,

Martín Trejo Chávez