I’ve finally found a legitimate, value-adding use for Ajax — comment previewing.
On this site, you used to have to preview the comment on a separate screen, remember what you wanted to change, then go back to the main screen and make your changes (I’ve complained about this exact model with Movable Type post editing.)
Comment previewing on this site is now “Ajaxified.” If you click “Show Preview,” your current comment text is thrown at the server, processed according to the current comment settings, then returned and populated in a green box just under the submit buttons.
It seems to work well, but let me know if you have any problems.
(And if you’re going to test it — like I know you will — understand that you do not have to actually submit the comment. The process of posting the actual comment is unchanged, so preview all you want but please don’t cruft up the post with a bunch of “testing” comments. Once you’ve seen the Ajaxified preview, there’s nothing else to see, really.)
Update: Some people have asked for the script. It’s here, and it’s nauseatingly commented so it should be self-explanatory. And I’m no JavaScript ninja, so if something needs to be re-written, I’m all ears.
I love Movable Type, but using WordPress on my personal site has highlighted two annoyances with the MT editing interface which are real problems. Rather than just being annoying, they really have an effect on the quality of writing and categorization. Semi-WYSIWYG editing. In WordPress, you can "Save and…
Oh this is great! Thanks for sharing.
IE6 show the following JavaScript error:
Line: 55The previewing does work however...
Char: 2
Error: The data necessary to complete this operation is not yet available
Code: 0
URL: ...post/4112
This is pretty neat! I like it!
What's going on here?
I just might implement this in my MT site! Thanks!
IE6 show the following JavaScript error:
Line: 55 Char: 2 Error: The data necessary to complete this operation is not yet available Code: 0 URL: ?post/4112
This looks cool