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 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display text with...

    Which HTML tag should I use if I want to display text? But I also want to access this text dynamically by the "value" attribute and display it as readonly ? (like an input tag but without the frame around the text)

    Thanks!

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    <textarea readonly="readonly" style="border:0px;"></textarea>
    Zvona
    First Aid for
    Web Design

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ...

    Ok thanks!

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    there is also use of DIVs for example

    <div id="text2mod"></div>

    <script>
    text2mod.innerHTML = "this is the new text"
    </script>

    this is very usefull for changing text without having a big box around it. i used this once to make a matric style typer. scared the hell out of my sister when she thought that one of her exs had nabbed the control off her computer!
    photoshop too expensive? use the GIMP! www.gimp.org

  • #5
    New Coder
    Join Date
    Jun 2002
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    innerHTML

    This was the method I was using temporarily although it's pretty useful to use and works with IE and Mozilla 1.0, I prefer to access an object by its value attribute when it's possible because of the possible HTML tags embedded in the innerHTML (<b> for example).

    But thanks for your reply.


  •  

    Posting Permissions

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