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
|