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 8 of 8
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making a colored box area inside a textarea.

    Code:
    code in colored_box_textarea.html
    
    <textarea name="message"
              cols="70"
              rows="10">(1)This is inside a no colored box area. 
    
    (2)This sentence is inside a yellow colored box. 
    
    (3)This is inside a no colored box.</textarea>
    When I browse "colored_box_textarea.html"
    I like to see the 2nd sentence is inside yellow colored box.


    Can I do it with your help?
    Get my greedy up

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Why are you using a textarea for this? You can use a div with overflow:auto; in CSS. You can only style the text in a textarea, you can't have a border around certain areas of text.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    You can't do that with textarea. Probably what you want is a rich-text editor.

  • #4
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv
    You can't do that with textarea. Probably what you want is a rich-text editor.

    Yes, that's it. that's what I want.

    But the rich-text editor is actually more than I want.

    I don't need all functions which are in the rich-text editor.

    The rich-text editor has too many functions which make it difficult to understand. Forthermore some of javascript code of it is encripted.

    I just need a yellow colored box in the text inside the textarea.

    I don't need the synchronized function.
    I just need a yellow colored box.

    And if I click the submit button.

    I just want the data passing '(1)This is inside a no colored box area.

    <div class="yellow_box">(2)This sentence is inside a yellow colored box.</div>

    (3)This is inside a no colored box.'


    I like to do it with your help.
    Last edited by joonstar; 04-22-2005 at 08:03 AM.
    Get my greedy up

  • #5
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_
    Why are you using a textarea for this?
    I can't explain the complex my own reasons for it.

    So I like to explain it very simply.

    let's suppose I have the following result.
    kldjdidivhvkjcoeckmckdldpoekdjmcnsdjekdkld
    dlfkfigkvbkbmfkfdkfdoifdkfkfirioreoprpolkfdlkfd
    in order to modify mf to nh
    I have to change it in the textarea.
    but it's very difficult to find where is the <font color=red><b>mf</b></font> if the text is very long and there are many text which are bolded and colored.

    That is my basic reason.
    Get my greedy up

  • #6
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I believe there is a way to highlight a text range in Internet Explorer... if that's what you're using.
    *this message will self destruct in n-seconds*

  • #7
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by codegoboom
    I believe there is a way to highlight a text range in Internet Explorer... if that's what you're using.
    Yes, I am using IE.

    How can I get the way to highlight a text range in IE?
    Get my greedy up

  • #8
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by joonstar
    How can I get the way to highlight a text range in IE?
    Well, there may be more than one way... all documented, at that.
    Quote Originally Posted by joonstar
    I can't explain the complex my own reasons for it.
    You'll need to state the specifics of I/O, because I'm not sure what you're after (guessing it's similar to a find/replace function...).
    *this message will self destruct in n-seconds*


  •  

    Posting Permissions

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