SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    TEXTAREAS and javascript

    I have noticed many features on web forums that allow you to enter text into a text area. For instance think of this very forum. You cick on the smiley faces and some word is added to the script which will later be read as a smiley face. How do you do this. I guess its with javascriopt. I suppose you lcick on a link and some javascript is activated. That adds some text to the text area. What is that text likely to be. If the text areas id was say "mytextbox"

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try to look here
    http://www.faqts.com/knowledge_base/index.phtml/fid/130

    I hope that will hepful to you.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #3
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The "bbcode" (eg. smiley) is added via javascript then when the form is submitted or displayed php replaces the bbcode with what is intended.

    There are several methods to achieve this... one is str_replace
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  4. #4
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think unclesirbobby wants that JavaScript help how to insert that particular bbcode to the particular location of the textarea.

    Do you know wheeler?
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,049
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    smilies

    They are also called "emoticons" (emotion icons).


Bookmarks

Posting Permissions

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