# IE7 and ror problem

**URL:** <https://www.ruby-forum.com/t/ie7-and-ror-problem/122335>\
**Category:** Ruby\
**Created:** [December 6, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/ie7-and-ror-problem/122335 "2007-12-06T18:56:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rumz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9de0a6/32.png) [@rumz](https://www.ruby-forum.com/u/rumz)\
**Post date:** [December 6, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/ie7-and-ror-problem/122335/1 "2007-12-06T18:56:51Z")

</div>

I’am trying to redirect the user to the login page if the user is not  
already logged in.

\<%= link\_to\_remote “Add To Favorites”, :update =\> “content-item-  
favorite-#{content\_item.id}”,  
:url =\> {:controller =\> :user, :action =\> :add\_favorite, :params  
=\> {:id =\> content\_item.id }}, 302 =\> ‘document.location =  
request.getResponseHeader(“location”); return false;’ %\>

This works in Firefox but in IE7 the login page gets embedded in the  
current page instead of getting redirected!

any thoughts?

Many Thanks  
Ramya

---

<div class="post-metadata">

**Author:** ![rumz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9de0a6/32.png) [@rumz](https://www.ruby-forum.com/u/rumz)\
**Post date:** [December 6, 2007, 10:09pm UTC](https://www.ruby-forum.com/t/ie7-and-ror-problem/122335/2 "2007-12-06T22:09:06Z")

</div>

rumz wrote:

> This works in Firefox but in IE7 the login page gets embedded in the current page instead of getting redirected!

Hmmm… check out the HTML source that the code generates. Also, you  
missed the RoR forum by 1.

[http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)
