logo

New Response

« Return to the main article

You are replying to:

  1. I do a simple little preview with javascript that seems to please most folks. You can get as creative as you like with it but the basic concept, I'm sure anyone can figure out on their own, is to open a new window;

    var preview = window.open('preview',url, options);

    By naming it, you can reuse it... but more importantly...

    preview.document.writeln('<html>...');

    I have a demo of this, free for the asking (just email me), that could pretty much be copied and pasted in -- offering some configurable variables for color and such. Simply putting such a function behind a 'preview' button would allow someone to see the content of the text box... which you push by concatenating your window.document.forms[0].inputname.value over with the above .println( command.

    Once you push the value to a (scrollable) pop-up window, folks can see what their text looks like outside the box, as it were. Handy for a clean reread. Since you're pushing html, you can write an OK push button right into it, or a print button, or include stylesheets... fun and easy.

    Jerry

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: