# Updating the parent page DIV using Ajax

**URL:** <https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975>\
**Category:** Rails\
**Created:** [December 11, 2006, 6:34am UTC](https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975 "2006-12-11T06:34:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![selva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@selva](https://www.ruby-forum.com/u/selva)\
**Post date:** [December 11, 2006, 6:34am UTC](https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975/1 "2006-12-11T06:34:39Z")

</div>

Hai

```
I am developing one web site.I have one rhtml file with search link

```

and one div.If i click on that link one more window will open with  
search result. If i click on any of that result.That data should be  
updated in parent page div.Now i am trying with Ajax. Is there any other  
way to do this task??

please help me in advance…

regards  
selva

---

<div class="post-metadata">

**Author:** ![selva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@selva](https://www.ruby-forum.com/u/selva)\
**Post date:** [December 11, 2006, 3:22pm UTC](https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975/2 "2006-12-11T15:22:27Z")

</div>

try to use link\_to\_remote, i think that is what you want

---

<div class="post-metadata">

**Author:** ![selva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@selva](https://www.ruby-forum.com/u/selva)\
**Post date:** [December 11, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975/3 "2006-12-11T15:41:39Z")

</div>

Helder O. wrote:

> try to use link\_to\_remote, i think that is what you want

Thank you for your response, But I am still confused where i can use  
link\_to\_remote? whether from parent page link or child page link???.  
After clicking on that link i have to close that window also.

Now I am using link\_to\_remote from parent page. while clicking on  
that link it is opening child window.Now when i click on that result,  
the request is going to controller.but its not updating div id of the  
parent window.In development log i am able to see the the query which i  
am passing from the child window.But after that nothing is happening.

---

<div class="post-metadata">

**Author:** ![selva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@selva](https://www.ruby-forum.com/u/selva)\
**Post date:** [December 12, 2006, 5:11am UTC](https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975/4 "2006-12-12T05:11:55Z")

</div>

Selvaraj S. wrote:

> Helder O. wrote:
> 
> > try to use link\_to\_remote, i think that is what you want
> 
> Thank you for your response, But I am still confused where i can use  
> link\_to\_remote? whether from parent page link or child page link???.  
> After clicking on that link i have to close that window also.
> 
> Now I am using link\_to\_remote from parent page. while clicking on  
> that link it is opening child window.Now when i click on that result,  
> the request is going to controller.but its not updating div id of the  
> parent window.In development log i am able to see the the query which i  
> am passing from the child window.But after that nothing is happening.

HAI,

```
 Any one got where i am getting problem, Really i am wasting lot of 

```

time on this issue…

---

<div class="post-metadata">

**Author:** ![selva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@selva](https://www.ruby-forum.com/u/selva)\
**Post date:** [December 12, 2006, 6:27am UTC](https://www.ruby-forum.com/t/updating-the-parent-page-div-using-ajax/78975/5 "2006-12-12T06:27:21Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On Dec 11, 2006, at 10:11 PM, Selvaraj S. wrote:

> ```
> Any one got where i am getting problem, Really i am wasting  
> 
> ```
> 
> lot of  
> time on this issue…

When debugging ajax stuff, the firebug extension for Firefox is  
really helpful; it lets you look at your DOM, as well as spy on the  
http request and answer that comes back. It’s useful to see what the  
server is actually sending…

David M.  
Maia Mailguard [http://www.maiamailguard.com](http://www.maiamailguard.com)  
removed\_email\_address@domain.invalid

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFfj2UUy30ODPkzl0RAsOpAJwO6vDn7jx3XCYUhQVxoGflLiatSACeNgk4  
rxslkoiEX4yYLC+x5gihZ5U=  
=gmPq  
-----END PGP SIGNATURE-----
