This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Problem with strings with duplicate space characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem with strings with duplicate space characters" Watch "Problem with strings with duplicate space characters" New topic
Author

Problem with strings with duplicate space characters

seb petterson
Ranch Hand

Joined: Mar 04, 2005
Posts: 118
Hello,

So does anyone know if theres a way through javascript to get the exact text string that is contained within a td including double spaces. In my case I have a value like "A B". Notice the double spaces. It renders in the browser as a single space which it is supposed to. But the source still contains two space characters and I would like to get this string "A B" (length 4) rather than "A B" (length 3).

How can I do this from javascript??

Thanks in advance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If the innerHTML property does not return it than you probably are out of luck since the browser might have rendered it out.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with strings with duplicate space characters
 
Similar Threads
Control characters
Problem with character behavior (lowercase ,uppercase)
basic stringing need helps
Following the Javaranch programming style guide....
WYSIWYG validation