Thread
:
JS script not working properly on IE but working on Firefox!!!
View Single Post
#
4
(
permalink
)
05-18-07, 07:40 AM
Nico
Community Leader
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
javascript Code:
value = value.
replace
(
/[\r\n\s]+$/
,
''
)
.
replace
(
/^[\r\n\s]+/
,
''
)
;
This would trim blank lines and spaces from the beginning and end of the string.
__________________
Zend Certified Engineer
|
My Twitter
|
HotScripts' Blog
|
HotScripts' Twitter
|
How to ask questions the smart way
Nico
View Public Profile
Visit Nico's homepage!
Find all posts by Nico