Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with strings with duplicate space characters

 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the innerHTML property does not return it than you probably are out of luck since the browser might have rendered it out.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic