PDA

View Full Version : Javascript Preview Form Fields


acaprice
10-10-2004, 11:21 PM
I have a simple form, 2 multi-line text boxes. I would like to have a Preview button where the user can preview the text in the fields in a different location on the page.

I have seen a lot of scripts that let you preview form fields on other pages, but none that let you preview them on the same page, and these do not let you assign a location on the preview page to pace the text.

I need the preview text to be text in the page HTML, not in another form field like many of the scripts work). So that way I can apply some CSS styles to the new content.

I have also seen scripts that show a preview as you type in the form field (no need for a preview button) and that would be good as well, as long as I can chnage wher eon the page the preview text will be shown.

Any ideas? Also any one have a script to keep the line breaks that a user types in the form field? Currently the form removes them and creates a single line of text.

Thanks in advance!