my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes Find Two Strings that Match Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Find Two Strings that Match" Watch "Find Two Strings that Match" New topic
Author

Find Two Strings that Match

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
What am I missing? The following should produce a match on at least one select item.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

What does debugging show you about the values of the strings at the time of comparison?

And I don't think I've ever used a String constructor in JavaScript in my entire career. Why do you feel they're necessary here?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
Bear Bibeault wrote:What does debugging show you about the values of the strings at the time of comparison?

And I don't think I've ever used a String constructor in JavaScript in my entire career. Why do you feel they're necessary here?


I think it was failing because one of the values was not trimed. It seems to be working now. Thanks for the help.

By the way I removed the String Constructor code which was only used as one of my attempts to get the compare to work.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Find Two Strings that Match
 
Similar Threads
.equals()- How it works
Overloading
Help please
Open page up in a new Window
Controling the DIV tag Z value