Thread: Advanced Textarea question
Results 1 to 2 of 2
Related
-
Advanced Browser ~ Do you know of it. Forum: General Discussion
Replies: 4 -
Advanced redirecting in Javascript Forum: Javascript Forum
Replies: 2 -
Advanced Tables Forum: HTML Forum
Replies: 2 -
Advanced Frames Question? Forum: HTML Forum
Replies: 4
-
05-30-2002, 05:21 PM #1
Advanced Textarea question
Okay, I've seen this done only once before and when I seen it I never thought nothing of it, now that I'm wanting to have this on my website to make my user's visit more pleasant, I can't find it again. I have been searching google typing in everything i could think of, but I can't figure out.
When using the textarea tag, you can supply cols= and rows= ..... Well, what I want to be able to do is have like cols=50 and rows=10, or something like that, but if the user wants it bigger, they can click on the corner of the text area and resize it to their likings.
I think I would need to use CSS possibly, like textarea style=whatever, but I'm not sure. I have looked everywhere and figure it out, maybe it's javascript? Who knows.
I've asked all my friends (we all do a lot of webdesigning), but everyone seems to think it's impossible...NOTHING is impossible...Maybe one of yall know? Thanks ahead of time for trying at least.
-metaphyber
-
05-31-2002, 01:24 AM #2
Its not impossible.
Heres a simplified version that demonstrates how to access CSS attributes using JavaScript. When you focus on the textarea, it gets bigger, when your focus moves away, it gets smaller.
Code:<head> <script language="JavaScript"> <!-- function bigme(obj) { obj.style.width='200px'; } function smallme(obj) { obj.style.width='50px'; } //--> </script> </head> <body> <textarea id="test" name="tester" onFocus="bigme(this)" onBlur="smallme(this)" cols="3" rows="10"> </textarea>
ALternatively, you can grab stuff from http://www.dynamicdrive.com . They have lots of DynamicHTML scripts there for free.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?