Created
December 20, 2008 22:53
-
-
Save visnup/38445 to your computer and use it in GitHub Desktop.
an in place editor that doesn't submit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editor = new Ajax.InPlaceEditor('chart_name', '', { | |
okControl: false, | |
cancelControl: false, | |
submitOnBlur: true, | |
highlightcolor: 'transparent' | |
}); | |
// override the bound submit handler function to prevent | |
// the control from actually submitting to a url and instead | |
// do something more useful with the edit. | |
editor._boundSubmitHandler = function(e) { | |
var value = $F(editor._controls.editor); | |
editor.element.update(value); | |
chart.record.name = value; | |
editor._boundWrapperHandler(); | |
if (e) e.stop(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment