Share Pastebin
Guest
Public paste!

jesus2099

By: a guest | Jul 18th, 2007 | Syntax: JavaScript | Size: 0.48 KB | Hits: 91 | Expires: Never
Copy text to clipboard
  1. // Analyze XmlHttp response
  2. function xmlhttpChange() {
  3.  
  4.         // create XMLDOM object if xmlhttp shows "loaded"
  5.     if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
  6.         {
  7.        
  8.                 var xmldoc = xmlhttp.responseXML;
  9.  
  10.                 var xpathExpr = "count(id('content-td')//xhtml:a[contains(text(), '" + editorName + "')])>0";
  11.                 var isSubscribed = xmldoc.evaluate(xpathExpr, xmldoc, NSResolver, XPathResult.BOOLEAN_TYPE, null).booleanValue;
  12.                
  13.                 if (isSubscribed) {
  14.                         subscriptionDecorator();
  15.                 }
  16.         }              
  17. }