# Responds\_to\_parent plugin

**URL:** <https://www.ruby-forum.com/t/responds-to-parent-plugin/97924>\
**Category:** Rails\
**Created:** [July 11, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/responds-to-parent-plugin/97924 "2006-07-11T14:11:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dukael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c77e96/32.png) [@dukael](https://www.ruby-forum.com/u/dukael)\
**Post date:** [July 11, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/responds-to-parent-plugin/97924/1 "2006-07-11T14:11:18Z")

</div>

Not sure where I can get help with this one but I getting a wierd  
behavior out of safari when trying to use the responds to parent  
plugin. Basically I have the following in my view:

 \<%= form\_tag({:action =\> "create"}, {:multipart =\> "true", :target =\> "frame"}) %\> 
 \<%= text\_field("publisher", "name", "size" =\> 20) %\> 

 \<%= text\_field("publisher", "website", "size" =\> 20) %\> 

 \<%= file\_column\_field("publisher", "logo") %\> 

 \<%= submit\_tag("Save") %\> \<%= end\_form\_tag %\>

its a simple little proof of concept app that I have been playing  
with as my knowledge of rails grows as well as as new features/  
plugins come out so that I can see how different things work.

the controller looks like this:

def create  
@publisher = Publisher.create(params[:publisher])  
responds\_to\_parent do  
render :update do |page|  
page.replace\_html ‘rightcolumncontent’, :partial =\> ‘show’  
end  
end  
end

my problem is that safari automatically tries to create the publisher  
as soon as I load up the new publisher page and runs create. This  
happens after I try to load something. It seems to be getting the  
iframe target from cache or something but I am not sure what. IE and  
Firefox behave exactly as they should. Any thoughts on how to get  
safari to play nice with this page?

Thanks

Andrew

---

<div class="post-metadata">

**Author:** ![dukael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c77e96/32.png) [@dukael](https://www.ruby-forum.com/u/dukael)\
**Post date:** [July 11, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/responds-to-parent-plugin/97924/2 "2006-07-11T14:30:30Z")

</div>

I should clarify, I did some more testing and it only seems to do  
this when I call the template using RJS. The link I use to load the  
page is a link to remote that replaces the inner\_html of a div. if I  
go to another page (regular link\_to) and than come back and call  
click on the link\_to\_remote link safari behaves as it should.  
Starting to look like I need to rethink how this is going to work  
unfortunately unless anyone has a suggestion.

Andrew
