I'm at a loss of how to solve this problem.
I have a field that I want to update. I add the inline editor and it
edits fine. The ajax submission is fine. However I'm trying to
handle the event that a database update fails.
Edit successful > send to php > php updates database > database update
fails
What it is going to return to my inplaceeditor field is whatever I
echo out after the update fails. However where do I get the original
value of the field? I'm trying to pass it in the ajax call but I
can't even get to it from the inplaceeditor object.
Closest I got was trying to access the value with getValue() function
from the onEnterEditMode function handler. I can alert out the value
but I can't seem to save it anywhere that I can get to it from the
callback to add it to the post.
What are your thoughts on how this is supposed to work?
var editor = new Ajax.InPlaceEditor(
'elementid', '/php-controller.php', {
onEnterEditMode: function (e){
alert(e.getText());
},
callback: function (form, value) {
myThis = this;
return 'post1=testpost1');
}
}
);
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.