Streamlining live preview code
March 18, 2004 5:57 PM   Subscribe

This live preview hack seemed so beautiful and simple that I'm currently implementing it on a personal website. Any geekerHeads out there who can find any potential problems, or better yet, provide something more efficient?

i understand script is never failsafe, but i would like to know if anyone here notices any significant problems. thanks much!
posted by poopy to Computers & Internet (3 answers total)
Works well for me in Firefox on Windows. I do see this complaint in the JS console:

Error: The stylesheet was not loaded because its MIME type, "text/html", is not "text/css".

So I suspect that it may not look the way you intended, although the appearance is perfectly acceptable to me.
posted by i_am_joe's_spleen at 6:34 PM on March 18, 2004

i wouldn't term this a "hack", so to speak. as a matter of fact, using ISS, i was able to use ASP's XML functions to call database queries and refresh the screen with data after a use tabbed out of a field.

as a matter of fact, it was when somebody entered some data into a field (in this case, ICD9 codes), and i had an event for losing focus that called an function that opened a DLL. that DLL opened a database table and returned the data in XML, and then the DHTML portion of the javascript updated some innerHTML next to the input=text box.
posted by taumeson at 8:59 PM on March 18, 2004

From a usability perspective, if users tend to post plain-text comments I don't see how the 'preview' offers an advantage over reading the text in the textarea itself. Also, the "submit" button moves further and further down the screen as you type, which may be confusing.
posted by mmoncur at 11:47 AM on March 19, 2004

« Older Is it possible to build a new laptop into an...   |   Actor's Studio Programs Newer »
This thread is closed to new comments.