[Javascript] Sorting Problem in Javascript

Rajkumar M rajkumarr at jbsoftindia.com
Wed Feb 4 23:56:59 CST 2004


Hi Folks,
   I am a silent spectator of this group these days and its my turn to get
some inputs from you guys,
Actually I want to sort the list of rows displayed using XML. Its working
fine in our internal server but not in external server. The only difference
is we are having SSL for the external server.
Here is the sample of code:
The script gives an exception  (  'list.item(...)' is null or not an
bject  )  while executing the last line

                xslob = new ActiveXObject("Microsoft.XMLDOM");
                xslob.async = "false";
                xslob.load ("../sort.xsl");
                list = xslob.getElementsByTagName("xsl:apply-templates");

        list.item(2).setAttribute("order-by",sortorder+sortcol); //Here the
problem comes

I think the list has no value that's why it is giving this exception. Why
the list has not loaded?
Any suggestions on this regard will be appreciated?

Thanks,
Rajkumar.




More information about the Javascript mailing list