Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    preview before submiting comment ?

    ok so on mysite, i have where users can comment each other.

    but i cant figure out a simple way to make a "Preview" before they submit it.
    and i want the preview to show the html and stuff.

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts

    Use JavaScript

    I am sure that there are a lot of ways to do this, depending on what you specifically want. but here is a couple of ideas of how it can be done.

    1- You can use JavaScript to open a popup window displaying a preview. Very simple, just do a google search and I am sure you find loads of solutions. (the downside to using this method is that a user can easily disable JavaScript and hence, it won't work).

    2-You can post to a page that would display a preview of the comment before final submission. On the preview page, you should have a form with a hidden field and a button. if the user is happy with their comment, all they have to do is to post the comment, if not, then they can click the back button to continue editing their page.

    I hope that helps.
    All the best


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •