dynamic textarea question

D

DL

Hello,

What I intend to do is to give a textarea 60% of a browser window's
height and width respectively.

Here's how my current page look like in a nutshell.
At top, the CSS section has the following line:
body { height:100%; widht:100%}
/* purpose: to prepare for the relative width and height
call from the textarea element
*/

In the middle of the page, it includes a subpage which contains the
Textarea element
and here's how the textarea element look like:
<textarea id="txt" name="txt" style="height:60%;width:60%"></textarea>
// this subpage needs to be a separate entity.

But the above specified width and height for the Textarea is not
recognized.

Also, the current page (main page) used quite a few CSS scripts for a
third party tool, that is, extJS...

What's wrong? How do we solve it?

Thanks in advance.
 
D

Dr_Kral

Hello,

What I intend to do is to give a textarea 60% of a browser window's
height and width respectively.

Here's how my current page look like in a nutshell.
At top, the CSS section has the following line:
body { height:100%; widht:100%} spelling?
/* purpose: to prepare for the relative width and height
call from the textarea element
*/

In the middle of the page, it includes a subpage which contains the
Textarea element
and here's how the textarea element look like:
<textarea id="txt" name="txt" style="height:60%;width:60%"></textarea>
What is the 60% of ??
// this subpage needs to be a separate entity.

But the above specified width and height for the Textarea is not
recognized.
width spec works
Also, the current page (main page) used quite a few CSS scripts for a
third party tool, that is, extJS...

What's wrong? How do we solve it?
Define it rationally (in em or px) or relative to screen size or use
rows/cols spec.
Thanks in advance.
YW
 
B

badl

Hello,

What I intend to do is to give a textarea 60% of a browser window's
height and width respectively.

Here's how my current page look like in a nutshell.
At top, the CSS section has the following line:
body { height:100%; widht:100%} spelling?
/* purpose: to prepare for the relative width and height
call from the textarea element
*/

In the middle of the page, it includes a subpage which contains the
Textarea element
and here's how the textarea element look like:
<textarea id="txt" name="txt" style="height:60%;width:60%"></textarea>
What is the 60% of ??
// this subpage needs to be a separate entity.

But the above specified width and height for the Textarea is not
recognized.
width spec works
Also, the current page (main page) used quite a few CSS scripts for a
third party tool, that is, extJS...

What's wrong? How do we solve it?
Define it rationally (in em or px) or relative to screen size or use
rows/cols spec.
Thanks in advance.
YW
 
D

DL

What is the 60% of ??



width spec works



Define it rationally (in em or px)  or relative to screen size or use
rows/cols spec.


YW

"
or relative to screen size
"
How do we do that within the context I mentioned?

Thanks.
 
J

Jukka K. Korpela

DL said:
What I intend to do is to give a textarea 60% of a browser window's
height and width respectively.

Sounds like a CSS question, not JavaScript.
Here's how my current page look like in a nutshell.

You should post a URL, not snippets of code.
body { height:100%; widht:100%}

You didn't use the "W3C CSS Validator", did you? It would have told you that
there is no such property as widht.

ObJavaScript: You _could_ modify the style properties of a textarea element
in JavaScript, too, but what would be the point? If you e.g. had event
handlers that check the amount of text in the textarea, you could then
expand it as needed, but this would slow things down and would deviate from
the normal, expected behavior (the appearance of scroll bars and scrolling
behavior when needed) of multiline input fields.
 
D

DL

Le 5/30/10 4:53 PM, DL a écrit :




if the function showProj() is in the main page, maybe better with :

<iframe onload="parent.showProj(); ...

Thanks for the idea, Sam, but on a second thought, maybe I don't even
use the auto-suggest function for the IE browser when a user first
starts to use the app... it may confused some of these users...

Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top