Give it a try:
http://os.flvorful.com/super_in_place_controls
--
Jochen Kaechelin
figgfrosch.de / gissmoh.de / ror-ror.de / railswerk.de
I just tried it here:
<span class="inplace_span" id="guest_namen_1"
onclick="Element.hide(this);$('guest_namen_1_form').show();"
onmouseover="new Effect.Highlight("guest_namen_1",{});"
title="Click to Edit">jochen</span><form action="/guests/
set_guest_namen/1" class="in_place_editor_form"
id="guest_namen_1_form" method="post" onsubmit="new Ajax.Request('/
guests/set_guest_namen/1', {asynchronous:true, evalScripts:true,
onComplete:function(request){$('loader_guest_namen_1').hide();},
onLoading:function(request){$('guest_namen_1_form').hide(); $
('loader_guest_namen_1').show();}, parameters:Form.serialize(this) +
'&authenticity_token=' +
encodeURIComponent('08636d4bb04dee6871dd01cc4b86a559d5e1cf08')});
return false;" style="display:none"><div style="margin:0;padding:
0"><input name="authenticity_token" type="hidden"
value="08636d4bb04dee6871dd01cc4b86a559d5e1cf08" /></div><input
class="inplace_text_field" id="guest_namen" name="guest[namen]"
size="30" type="text" value="jochen" /><input class="inplace_submit"
name="commit" type="submit" value="OK" /><a class="inplace_cancel"
href="#" onclick="$('guest_namen_1_form').hide();$
('guest_namen_1').show() ; return false;">Cancel</a></form><div
class="inplace_loader" id="loader_guest_namen_1"
style="display:none"><img alt="Spinner" src="/images/spinner.gif?
1198155982" /> <span>Saving...</span></div><br></br>
....seems to work...
No idea how to get around that, sorry.
You could try generating your own authenticity_token.
<%= javascript_tag "window._token = '#{form_authenticity_token}'" %>
That will make your authenticity token available to your custom
javascript Ajax requests. If you're using prototype.js and you want to
do a custom PUT, you do something like this.
new Ajax.Request ('/products/1', {
method: 'put',
parameters: 'product[name]=chair&authenticity_token=' +
window._token});
--
Posted via http://www.ruby-forum.com/.
You can also use the form_authenticity_token() function do generate it.
Like :
<form action="/posts/search" method="get">
<input name="q" type="text" value="">
<input type="submit" value="Search" />
<input type="hidden" value="<%= form_authenticity_token() %>"
name="authenticity_token"/>
</form>
I just wanted to say THANK YOU for posting about
form_autheticity_token()!!! Being new to ruby/rails, I'm not used to a
lot of the methods or procedures used within the framework. I was stuck
on trying to od a simple search when this saved me.
Thanks again!
-Tony
i m trying to communicate two WEBrick Server with Different port.
I have 2 application
1) Service
2) Operation
service is running on 3000 port no and operation is running on 4000
port no
and i m trying to get the action of 3000 port from 4000 port. but
when i
trying i m get this error . could any body help me please
Thanks in Advance
Harish
I developed REST Application and i got success. but i want to
develop a
REST application which can perform any arithematic operation.
Not getting any idea . can any body explain me plz..........