icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old November 1st, 2005, 10:26 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2005
23 posts
Gave thanks: 0
Thanked 0 times
Line Breaks in Textarea Don't Work

When I type something in my guestbook/comment textarea - line breaks don't appear. It shows everything as one big block of text. Does anyone have any idea why this is? Here's the address so you can see what I mean:

http://www.alittlebitofsunshine.com/comment.html
alittle is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 1st, 2005, 11:18 PM   #2 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
I'm guessing the cgi program isn't using a linebreak function in it's coding.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2005, 12:48 AM   #3 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
If it's done with PHP then use nl2br(). If using Perl, then write a simple sub routine to convert it...

Code:
sub nl2br($text){
    $text = preg_replace( "/\\r\\n/", "<br />" );
    return $text;
}
I'm going to go out on a limb and say that's horribly, horribly butchered, but it's been a long time since I've used Perl and I just wrote it off the top of my head.
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2005, 1:01 AM   #4 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
I looked at the page code and the form is processing via a cgi script called mailform, so I'm guessing it might be a cpanel script.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2005, 8:33 AM   #5 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
That doesn't mean you can't modify it...
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2005, 5:10 PM   #6 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
I know, I was just restating in case you missed it before, since you put up the php comment, too.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 2nd, 2005, 8:24 PM   #7 (permalink)
Marketing Maven
Surpass Staff
 
Kayla's Avatar
 
Joined in May 2003
Lives in Chicago
24,757 posts
Gave thanks: 946
Thanked 807 times
There was so much help going on in this thread that it all conflicted. Time for group hug.

:hugs:
Kayla is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On