# RJS inside an iframe?

**URL:** <https://www.ruby-forum.com/t/rjs-inside-an-iframe/145408>\
**Category:** Rails\
**Created:** [August 8, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/rjs-inside-an-iframe/145408 "2008-08-08T21:56:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [August 8, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/rjs-inside-an-iframe/145408/1 "2008-08-08T21:56:37Z")

</div>

Is this possible? I might be able to see a problem with it updating  
something on the page but what about just storing a value in the  
database and not updating anything?

I tried the following in the iframe:

\<% call = remote\_function(:url =\> {:action =\> ‘update\_pic’, :only\_path  
=\> false, :id =\> (x-2)}) %\>

Click me

Everything is loaded correctly but nothing happens when I click… is  
this impossible? All update\_pic does is take the id and store it in the  
database and then it is suppose to set a boarder on the clicked object.  
I see why the boarder might not work but why wouldnt the value get  
stored in the database?

I know the code works because I had it working before placing it in the  
iframe

Thanks in advance

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [August 8, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/rjs-inside-an-iframe/145408/2 "2008-08-08T22:11:19Z")

</div>

Nothing like answering your own question. I looked for a while before I  
posted this but I found a suggestion of using an overflow:auto div which  
solves my problem and removes the iframe - perfect
