# Rjs works but gives some error

**URL:** <https://www.ruby-forum.com/t/rjs-works-but-gives-some-error/173380>\
**Category:** Rails\
**Created:** [August 7, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/rjs-works-but-gives-some-error/173380 "2009-08-07T18:24:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [August 7, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/rjs-works-but-gives-some-error/173380/1 "2009-08-07T18:24:13Z")

</div>

the link\_to\_remote

=====================================================

 \<%=link\_to\_remote "Click me",:url=\> {:action=\>"edit"},:update=\>"update\_me"%\>

# 

the rjs (edit.rjs)

# page.alert “test”

# the error message is try { alert(“test”); } catch (e) { alert(‘RJS error:\n\n’ + e.toString ()); alert(‘alert(“test”);’); throw e }

after the error the update\_me div isn’t updated

please help me

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [August 7, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/rjs-works-but-gives-some-error/173380/2 "2009-08-07T18:47:38Z")

</div>

On Aug 7, 5:23 pm, nirosh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the link\_to\_remote
> 
> =====================================================
> 
> \<%=link\_to\_remote "Click me",:url=\> {:action=\>"edit"},:update=\>"update\_me"%\>

Don’t use the :update option with an rjs template, pick one or the  
other.

Fred

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [August 7, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/rjs-works-but-gives-some-error/173380/3 "2009-08-07T20:17:13Z")

</div>

hi Fred  
now its working

Thankyou so much

nirosh

On Aug 7, 9:46 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
