Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to preview post

Status
Not open for further replies.

ahksar

Programmer
Jan 11, 2001
43
US
Hi,

I just put a web log application up(written in colfusion), and have got negative comments as users cannot preview their posts and also they cannot use HTML tags. Can anyone help me as to how exactly I should go about enabling these two, similar to posting in the tek-tips forum. Also, to edit post, if one is not satisfied with it.
Any help will be greatly appreciated.
ahksar
 
You can pass the posts as a form value and then refer to it on the preview page. For example, let's say a user types in their text in the MESSAGE textbox. Upon clicking preview, the preview template will retrieve the information that was posted. You refer to the textbox in the form of:

Form.MESSAGE

If the user is using Internet Explorer, pressing the BACK button will not delete the text that was written in the textbox. I'm not sure about the other browsers, however, so you can simply set the same variable on the preview page and on the form page.

For example, when the message is previewed the variable MESSAGETEXT will be created with the user's message text as the value. Also set the variable PREVIEWED to YES.

When the user reverts to the previous page a check will occur to see if the message has been previewed. If it has, there will be code to set the default value of the textbox to the message variable (MESSAGETEXT) that you set in the preview page. If it hasn't, the default value will be set to nothing.

Ryan ;-]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top