Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Preload a TextArea
July 28, 2005, 6:53 pm
rate this thread
<textarea wrap="hard" name="comment" rows="10" cols="80"></textarea>
which I want to preload by passing in some text in the URL, so I do
Now this puts "Line One" into my textarea.
Is it possible to put another line below this e.g. "Line Two" so I see
in my textarea?
So, basically, I've been trying to figure out is there some code for
"new line" like the code %20 for a space?
I can't alter the web page, I can only pass info the information using
"comment=" in the URL.
Any help appreciated,
Re: Preload a TextArea
That's fine, except for the nonstandard and harmful attribute wrap="hard".
Use wrap="off" instead; equally nonstandard, but useful, since it makes
wowsers behave the way they are supposed to, in line wrapping (i.e., not
mess things up by line breaks _they_ introduce).
Stop wanting that.
If the content is a meaningful and useful default content for _user input_
(which is what textarea is for), use tools like CGI or PHP to insert the
external content, or copy it by hand. But I doubt whether name="comment" is
adequate then. If you are asking for a user comment, why would _you_ want
to write that comment, or even a default for it?
Did you really mean www.myhost.com? There's no reason why it could not be a
real domain, today or tomorrow. So if you actually meant a dummy domain,
use www.myhost.example or something similar; the .example pseudo-domain is
guaranteed to remain nonexistent. Better still, tell us the real URL.
Maybe, depending on what your undisclosed CGI script does.
Of course. It all depends on your CGI script.
I'm afraid you are basically confused. Why on &Planet; would you want to
write some complicated URL to have some simple text (passed in the query
part in an encoded format) inserted, instead of simply inserting the text?
_Which_ web page cannot be altered by you? Yours?
Yucca, http://www.cs.tut.fi/~jkorpela /
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html