Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-25-2002, 09:45 AM   PM User | #1
pitchoo
New Coder

 
Join Date: Jun 2002
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
pitchoo is an unknown quantity at this point
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!
pitchoo is offline   Reply With Quote
Old 06-25-2002, 10:43 AM   PM User | #2
Zvona
Regular Coder

 
Join Date: May 2002
Location: Helsinki, Finland
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Zvona is an unknown quantity at this point
<textarea readonly="readonly" style="border:0px;"></textarea>
__________________
Zvona
First Aid for
Web Design
Zvona is offline   Reply With Quote
Old 06-25-2002, 10:50 AM   PM User | #3
pitchoo
New Coder

 
Join Date: Jun 2002
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
pitchoo is an unknown quantity at this point
...

Ok thanks!
pitchoo is offline   Reply With Quote
Old 06-25-2002, 12:10 PM   PM User | #4
whackaxe
Senior Coder

 
Join Date: Jun 2002
Location: paris, france
Posts: 1,216
Thanks: 0
Thanked 0 Times in 0 Posts
whackaxe is an unknown quantity at this point
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
whackaxe is offline   Reply With Quote
Old 06-25-2002, 12:19 PM   PM User | #5
pitchoo
New Coder

 
Join Date: Jun 2002
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
pitchoo is an unknown quantity at this point
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.
pitchoo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:47 PM.


Advertisement
Log in to turn off these ads.