Comment Previewing Using Ajax

Jul 11

Comment Previewing Using Ajax

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.


Comments

by Carla,   July 12, 2005 12:33 PM  

Oh this is great! Thanks for sharing.


by Kevin,   July 20, 2005 1:06 PM  

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
The previewing does work however...


by Alpaca,   July 23, 2005 11:33 PM  

This is pretty neat! I like it!

What's going on here?

I just might implement this in my MT site! Thanks!


by prashant,   June 22, 2007 10:16 AM  

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


by Nervo,   May 7, 2008 12:41 PM  

This looks cool


by ZK@Web Marketing Blog,   June 12, 2009 3:17 AM  

But now my bandwidth has been exceeded so this is why the page is currently down. I’m sorry about this. I’m talking to my hosting company now to try and resolve it. It seems I completely underestimated the interest the page would generate.


by baidu,   July 28, 2009 8:35 PM  

baidu



Comments are Closed

Thanks to all who participated.

Want to advertise on this site? Contact FM.