User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » newline in textarea Page [1]  
stephen_tl
All American
611 Posts
user info
edit post

Output of php is going into textarea. I can get a newline in firefox but in internet explorer it will not work. Am I doing something wrong?

I have tried using:
\n
\r\n
\\n
<br>

IE textarea just will not do a newline.....

4/13/2009 9:55:59 AM

evan
All American
27701 Posts
user info
edit post

make sure your \n is in double quotes, it won't work in single quotes

4/13/2009 10:10:35 AM

stephen_tl
All American
611 Posts
user info
edit post

i even tried that forgot to mention. Still doesn't work...

4/13/2009 10:22:44 AM

evan
All American
27701 Posts
user info
edit post

then you're doing something else wrong, lol... i just tried it.

post the relevant snippet of code here.

4/13/2009 10:26:53 AM

stephen_tl
All American
611 Posts
user info
edit post

figured out I can't use innerHTML with ie and preserve whitespace. So i going to need to do an alternative. dang wasted so much time...
so what would be a good alternative then doing

<script type="text/javascript">
function getajax(){
$("resultarea").innerHTML='Converting now. Please wait...'
var comments=$F("br");
new Ajax.Request ( "masterconverter.php", { method: "post", postBody: 'comments=' + comments,
onSuccess: function brResult(transport){$("resultarea").innerHTML=transport.responseText;
} } );
}
</script>

[Edited on April 13, 2009 at 10:52 AM. Reason : ..]

[Edited on April 13, 2009 at 10:52 AM. Reason : ..]

4/13/2009 10:46:05 AM

BigMan157
no u
103354 Posts
user info
edit post

it looks like you're using a framework (mootools or jquery or somesuch)... why are you using the native javascript functions instead of the built-in ones?

4/13/2009 11:00:03 AM

stephen_tl
All American
611 Posts
user info
edit post

yeah it was mostly built in till i saw the problem and thought it was the prototype problem and i slowly converted the built in to native and problem still existed. But I found a temp solution for now. Thanks all for helping.

4/13/2009 11:47:40 AM

 Message Boards » Tech Talk » newline in textarea Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.