Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Jari Bakken
RE: Ajax in place editor in celerity [ reply ]  
2009-04-02 12:52
At a glance I can't see anything wrong. If you can provide a reproducable example I'll take a look at it.

In the future you might have more luck using the celerity-users list, which is more active than this forum:

http://rubyforge.org/mailman/listinfo/celerity-users

By: Nina Jansen
Ajax in place editor in celerity [ reply ]  
2009-04-01 21:15
Hi

I have an ajax in place editor in my rails application. The HTML looks like this:

<form class="inplaceeditor-form" id="person_name_1_in_place_editor-inplaceeditor"><input class="editor_field" name="value" size="25" type="text"><input class="editor_ok_button" value="OK" type="submit"><a class="editor_cancel_link editor_cancel" href="#">Cancel</a></form><span style="display: none;" title="" class="in_place_editor_field_name" id="person_name_1_in_place_editor">Person1</span><script type="text/javascript">
//<![CDATA[
new Ajax.InPlaceEditor('person_name_1_in_place_editor', '/person/set_person_name/1', {cancelText:'Cancel', clickToEditText:'', externalControl:'detailsEditNameBtn', htmlResponse:false, okText:'OK', size:25})
//]]>
</script>

When you click the OK button, you are supposed to fire off a request to '/person/set_person_name/1'. However, when I do this in celerity:

browser.form(:id,"person_name_1_in_place_editor-inplaceeditor").button(:value,"OK").click
browser.wait

I do not fire of a request to '/person/set_person_name/1' but instead a request is sent to /person/1/?value=Person1 . The form is submitted, but somehow celerity gets the destination wrong.

The in place editor works fine in regular browsers, and I can't figure out what I am doing wrong. Any guidance would be greatly appreciated.

Sincerely

Nina