I have different xml's (for diff os), I am posting only relevant xml part for SunOs xml.
<osname>SunOS
</osname>
This is fetched by jQuery
var osname = $(this).find('osname').text();
Later in the code when I compare, it always goes in to else part, I used console.info for firebug and attached a screenshot of my output
console.info("Before checking:"+osname);
if(osname=="HP-UX")
console.info("HP-UX");
else if(osname=="AIX")
console.info("AIX");
else if(osname=="SunOS")
console.info("SunOS");
else
{
console.info("Linux -");
}
Screenshot of Firebug console.info

My question is why can't it check for SunOs or any other?
Note: I think there is a extra character after the osname, I also made a xsl in that when I check i do something like below, how can i do it in JS?
XSL code
<xsl:if test="$sunos='SunOS
'">
I have also tried if(osname=="SunOS
")