# Rjs behaving oddly in IE - POST performed after the GET

**URL:** <https://www.ruby-forum.com/t/rjs-behaving-oddly-in-ie-post-performed-after-the-get/138714>\
**Category:** Rails\
**Created:** [May 27, 2008, 6:10am UTC](https://www.ruby-forum.com/t/rjs-behaving-oddly-in-ie-post-performed-after-the-get/138714 "2008-05-27T06:10:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amirj26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@amirj26](https://www.ruby-forum.com/u/amirj26)\
**Post date:** [May 27, 2008, 6:10am UTC](https://www.ruby-forum.com/t/rjs-behaving-oddly-in-ie-post-performed-after-the-get/138714/1 "2008-05-27T06:10:17Z")

</div>

I’m not sure if this is an IE-only thing, but it seems to only happen  
in IE. My view has a simple submit\_tag which calls an action  
‘generate’ on my controller which I’ll call ‘foo’. At the end of the  
generate method, I do the following:

respond\_to do |format|  
format.html  
format.rjs  
render :update do |page|  
page.show “div1”  
page.show “div2”  
page.replace\_html “div1”, some\_text  
page.visual\_effect :highlight, “div1”  
end  
end  
end

Now in index.html.erb for this controller, “div1” is set to hidden. In  
firefox when I run this, the div shows up correctly and gets populated  
with some\_text and everything works as expected. In IE however, the  
same thing happens, but almost immediately after the div shows up and  
is populated correctly, IE then redirects to  
[http://my.page.com/foo/generate](http://my.page.com/foo/generate),  
which results in a blank page since my generate.html.erb file is empty  
(since I dont actually want to ever be at this url).

Looking at my apache access logs, it is clear that in Firefox, when I  
do the submit, there is a GET request passed to /foo/generate with a  
bunch of parameters for the form, and thats it. In IE, the same thing  
happens, but it is followed by a POST to /foo/generate without any  
parameters afterwards which causes the blank page to be shown.

Anyone have any ideas as to what might be going on?

Thanks in advance.

Does anyone have ANY clues as to what might be happening?

---

<div class="post-metadata">

**Author:** ![amirj26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@amirj26](https://www.ruby-forum.com/u/amirj26)\
**Post date:** [May 29, 2008, 5:39am UTC](https://www.ruby-forum.com/t/rjs-behaving-oddly-in-ie-post-performed-after-the-get/138714/2 "2008-05-29T05:39:52Z")

</div>

I figured this out where the culprit is, and its because I’m using  
jQuery with jRails, and it looks like it must be overriding the  
form\_remote\_tag call in such a way where it looks to be making GET  
calls on the submit instead of POSTS. As soon as I strip out all my  
jQuery and jRails dependencies it works fine. Very strange still that  
it seemed to only manifest itself in IE.
