I'm clueless when it comes to jscript. That's why I chose a sample form as a basis for mine. Here's the deal...I've created a form with a repeating table so that the user can input as many lines as necessary. Now I want to give other users the ability to sort the form data as they see fit. Since the Asset Tracking sample form is conceptually very similar, I copied the entire code over to my form and named my fields accordingly. Of course, now I have a lot more code than I need, but that's a good problem to have, as long as the code works. Problem is, it doesn't work. When I click the Sort button, which corresponds to the reSort function in Asset Tracking, I get an error in the getNode function. The error points to the "return XDocument" line below.
Since I'm clueless at this stuff, can someone explain why this would be giving me an error? What sort of things should I be looking for to correct this problem?
/*------------------------------------------------------------------------------
getNode()
------------------------------------------------------------------------------*/
function getNode(xpath)
{
// Both XML node and absolute XPath are allowed.
if (typeof(xpath) == "string")
return XDocument.DOM.selectSingleNode(xpath);
else
return xpath;
}