I'm using classic ASP and javascript, and am running into a problem with string comparison and I'm not sure what else to try. I'm trying to build an ORDER BY sql script depending on subsequent clicks on links. What I want is to build the string "ORDER BY field1 ASC, field2 ASC" , etc. If someone clicks the link twice, I want to compare the last string added to the most one that was just clicked, and if the same, flip the order from ASC to DESC or vice versa. Here's my function...is there some trick to string comparison in javascript? I thought just the "==" operator would work. When I output the two strings I'm comparing, they look the same, but its just not coming back as true. Any ideas would be greatly appreciated. Thanks!!
