Live! Preview and XHTML Compatibility
I’ve added a new feature called “Live Preview”. You can see your comment as it will appear, right as you type it. I randomly just came up with the idea yesterday – I figured I could use the same code I have in place for the preview, for the Live Preview as well. I just trap the onkeyup event for the textarea. It works pretty well. Of course, there is a lag, but it’s not too bad. Oh yeah, I also removed the numbers in the comment list and replaced them with little blurbs that I made. The blurbs won’t show correctly in IE, because IE is stupid and doesn’t handle PNG transparencies well.
Here’s what the DOCTYPE (and other information) looks like:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Also, I have a sandboxed version of the website here. You can see the problem directly there.