SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    0 Post(s)
    0 Thread(s)

    Add Data Into Text Area... Please help

    Hello all!

    Can someone please tell me how I can make something similar to whats above the text area when someone replies or makes a new thread?

    The writers for my site don't know ANYTHING about HTML, and making something like the "http://" button above would be a huge help!

    I've done some searching, and only found ways to make bold and underline... etc.

    Anyways, can someone please help me out?

    Andrew Tatum
    FinHeaven & Co - Get Drenched With Finformation
    The FinHeaven & Co Forums

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Whistler BC originally from Guelph Ontario
    0 Post(s)
    0 Thread(s)
    I am not quite sure what you are asking. Well I am kind of sure. Are you retrieving this data from a database or just using javascript. I assume if it is similar to a response button than it is some sort of database and server language. That is how this site does it.

    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    0 Post(s)
    0 Thread(s)
    that is a pretty neat feature--it's all done with javascript, though what converts that code in to real html is a script running on the server. for in-house use you could just use html straight, probably, instead of using the vB Code.

    you can get an idea how sitepoint does it by viewing the source on a reply page and checking out and

    This is a fairly advanced little script, though, so if you don't know what you're doing, expect to be confused.

    -wg <><

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Gatwick, UK
    0 Post(s)
    0 Thread(s)
    Depends really on how you want the href to be shown.
    The document.createElement('A'); method would work quite well if you wanted an instant clientside reflection of the href:

    function create_link(){
     var hrf=prompt('Please type your link in here:','');
     var a=document.createElement('A');
     a.href=href;'_blank';'none'; // No underline'#660000';
     /* The following line would probably NOT work,
        but it might be worth a try, since if it does
        the effect would be very unique.
        As far as i'm aware the textbox element does NOT
        have the ability to spawn children
        This is the end of unlikely code!             */
     // The above would work though
    The other thing you might want to do is manually create a link and add it as text to a textbox so that you can then save it to the disk quickly with a server side language. ie: you literally put <a href='x' target='_blank'> into the textbox, and it's saved directly into the source by the server side lanugage.

    The third approach is to have a server language parse the text box for something like :href[].

    I don't see much point in doing it this way, but some people might want to for convienience of browser compatibility ( i can't stand NN anyway ;-) )

    Hope this adds something to the discussion.

    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Posting Permissions

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