My question is similar to this - how do get what would be javascript开发者_JS百科 this (so that I can get its value assuming its a form text input) ? I am trying to send the value of a text input to the callback you see:
html textInput id: #thingy;
onClick: (html jQuery ajax
callback:[:x | x inspect]
value:(html jQuery event currentTarget ????));
with: 'I am the value the poster wants to see inspected in the above callback block!'.
If you want to fire the callback when you click simply bind serializeThisWithHidden on the onClick event.
html textInput id: #thingy;
onClick: (html jQuery ajax serializeThisWithHidden);
callback:[:x | x inspect];
with: 'I am the value the poster wants to see inspected in the above callback block!'.
Out of my head :)
To get the value in the ajax callback you would use
html textInput id: #thingy;
onClick: (html jQuery ajax
callback:[:x | x inspect] value: html jQuery new value);
with: 'I am the value the poster wants to see inspected in the above callback block!'.
精彩评论