# RJS not reloading in IE

**URL:** <https://www.ruby-forum.com/t/rjs-not-reloading-in-ie/118271>\
**Category:** Rails\
**Created:** [October 25, 2007, 9:18am UTC](https://www.ruby-forum.com/t/rjs-not-reloading-in-ie/118271 "2007-10-25T09:18:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vixiom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/a698b9/32.png) [@vixiom](https://www.ruby-forum.com/u/vixiom)\
**Post date:** [October 25, 2007, 9:18am UTC](https://www.ruby-forum.com/t/rjs-not-reloading-in-ie/118271/1 "2007-10-25T09:18:32Z")

</div>

I’m trying to reload a page element with RJS after an ajax call and it  
works in FireFox but not IE.

######################################

# the method in products\_controller.rb

######################################

def option\_add  
@product = Product.find(params[:id])  
@option = Option.find(params[:option\_id])  
@product.options \<\< @option  
# update partial  
render :update do |page|  
page[:options\_list].reload  
end  
end

####################################

# ajax snippet in \_options\_list.haml

####################################

= link\_to\_remote image\_tag(‘cms/add\_16.gif’, :class=\>‘control’, :id =\>  
“option\_add”), :url =\> { :action =\> ‘option\_add’, :id =\> @product.id },  
:with =\> “‘option\_id=’+$F(‘option\_id’)”, :method =\> :post, :before =\>  
“$(‘option\_add’).hide( );$(‘option\_indicator’).show( );”, :success =\>  
“$(‘option\_add’).show( );$(‘option\_indicator’).hide();”, :failure =\>  
“$(‘option\_add’).show( );$(‘option\_indicator’).hide();”

#########################

# full \_options\_list.haml

#########################

#options\_list

- unless @product.options.length == 0;
  - @product.options.each do |option|  
.option\_row  
= option.name  
= link\_to\_remote image\_tag(‘cms/delete\_16.gif’, :alt=\>‘Delete’,  
:id =\> “option\_delete\_#{option.id}”), :url =\> { :action =\>  
‘option\_delete’, :id =\> @product.id }, :with =\> “‘option\_id=#{ option.id  
}’”, :method =\> :post, :before =\>  
“$(‘option\_delete\_#{option.id}’).hide();$(‘option\_indicator\_#{option.id}’).show(  
);”, :failure =\>  
“$(‘option\_delete\_#{option.id}’).show();$(‘option\_indicator\_#{option.id}’).hide();”,  
:confirm =\> “Are you sure?”  
= image\_tag(“cms/spinner.gif”, :id =\>  
“option\_indicator\_#{option.id}”, :style =\> “display:none”)

- else  
%p No options selected.

%dt  
%label Available:  
%dd  
= collection\_select(:option, :id, @available\_options, :id, :name)  
= link\_to\_remote image\_tag(‘cms/add\_16.gif’, :class=\>‘control’, :id  
=\> “option\_add”), :url =\> { :action =\> ‘option\_add’, :id =\> @product.id  
}, :with =\> “‘option\_id=’+$F(‘option\_id’)”, :method =\> :post, :before =\>  
“$(‘option\_add’).hide( );$(‘option\_indicator’).show( );”, :success =\>  
“$(‘option\_add’).show( );$(‘option\_indicator’).hide();”, :failure =\>  
“$(‘option\_add’).show( );$(‘option\_indicator’).hide();”

```
= image_tag("cms/spinner.gif", :id => "option_indicator", :class =>

```

“control”, :style =\> “display:none”)
