# Onchange error - InvalidAuthenticityToken

**URL:** <https://www.ruby-forum.com/t/onchange-error-invalidauthenticitytoken/136835>\
**Category:** Rails\
**Created:** [May 6, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/onchange-error-invalidauthenticitytoken/136835 "2008-05-06T18:44:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OhMyRuby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/0ea827/32.png) [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Post date:** [May 6, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/onchange-error-invalidauthenticitytoken/136835/1 "2008-05-06T18:44:26Z")

</div>

VIEW:

\<select id=“hello” name=“me” onchange ="new Ajax.Request(’…’)\>

\<option value = "344" selected="selected\>\</option\> \<p\>Can you enclosed this onchange here dynamically?\</p\> \<p\>the Ajax.Request i post come back with an InvalidAuthenticityToken\<br\> error.\</p\> \<p\>I don’t know where to strart on resolving that so I am wondering if I\<br\> can use the select tags in html and insert a remote\_function call…\<br\> to generate the javascript required.\</p\> \<p\>thanks.\</p\>

---

<div class="post-metadata">

**Author:** ![OhMyRuby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/0ea827/32.png) [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Post date:** [May 13, 2008, 11:02am UTC](https://www.ruby-forum.com/t/onchange-error-invalidauthenticitytoken/136835/2 "2008-05-13T11:02:59Z")

</div>

I have the same problem…have you got any solution?

Thanks.

---

<div class="post-metadata">

**Author:** ![OhMyRuby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/0ea827/32.png) [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Post date:** [May 13, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/onchange-error-invalidauthenticitytoken/136835/3 "2008-05-13T16:28:19Z")

</div>

Yes, you should be able to use the remote\_function call as long as you  
embed it in erb tags.

On May 13, 5:02 am, William Notowidagdo \<rails-mailing-l…@andreas-
