File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
WYSIWYG validation
Following the Javaranch programming style guide....
Problem with character behavior (lowercase ,uppercase)
basic stringing need helps