Hi, on Firefox Mochikit is running very well. I used Firebug to feel
my way through the available attributes, and got a nice in-place form
submission in 80 lines of javascript. Now on IE7, the on-failure
method of my get is always getting called.
This code doesn't address the form directly, because there are
hundreds of similar forms on the same page, so the code uses the this
var in the form's onSubmit. Is there a better way?
Can anyone offhand tell me what IE7 might not like? Thanks in
advance! -Jim
onTagFormSubmit = function(event) {
event.stopPropagation();
event.preventDefault();
tags = this.tags.value;
log ("got tags: " + tags);
params = {
"format":"json",
"item_oid":this.item_oid.value,
"tags":tags
};
// Submit the form, and set up success and fail handlers
var request = loadJSONDoc(this.action, params);
request.addCallbacks(onTagFormSuccess, onTagFormFailure);
tools_id = "tag_current_" + this.item_oid.value;
message = "Updating tags... please wait. ";
MochiKit.DOM.removeElementClass(tools_id, "hidden");
getElement(tools_id).innerHTML=message;
// no default action
return false;
}
onTagFormSuccess = function(result) {
// Update the current tags field associated with the
// particular form
text_area_id = "tag_text_" + result.item_oid;
getElement(text_area_id).value = result.newtags;
tools_id = "tag_current_" + result.item_oid;
message = "Your tags have been applied.";
getElement(tools_id).innerHTML=message;
MochiKit.Visual.Highlight(tools_id)
}
onTagFormFailure = function(result) {
alert ("Your tagging request failed. Please let us know.");
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---