[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 /* 2 * FCKeditor - The text editor for internet 3 * Copyright (C) 2003-2005 Frederico Caldeira Knabben 4 * 5 * Licensed under the terms of the GNU Lesser General Public License: 6 * http://www.opensource.org/licenses/lgpl-license.php 7 * 8 * For further information visit: 9 * http://www.fckeditor.net/ 10 * 11 * "Support Open Source software. What about a donation today?" 12 * 13 * File Name: fckxml_ie.js 14 * FCKXml Class: class to load and manipulate XML files. 15 * (IE specific implementation) 16 * 17 * File Authors: 18 * Frederico Caldeira Knabben (fredck@fckeditor.net) 19 */ 20 21 var FCKXml ; 22 23 if ( !( FCKXml = NS.FCKXml ) ) 24 { 25 FCKXml = NS.FCKXml = function() 26 { 27 this.Error = false ; 28 } 29 30 FCKXml.prototype.LoadUrl = function( urlToCall ) 31 { 32 this.Error = false ; 33 34 var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; 35 36 if ( !oXmlHttp ) 37 { 38 this.Error = true ; 39 return ; 40 } 41 42 oXmlHttp.open( "GET", urlToCall, false ) ; 43 44 oXmlHttp.send( null ) ; 45 46 if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 ) 47 this.DOMDocument = oXmlHttp.responseXML ; 48 else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) 49 { 50 this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ; 51 this.DOMDocument.async = false ; 52 this.DOMDocument.resolveExternals = false ; 53 this.DOMDocument.loadXML( oXmlHttp.responseText ) ; 54 } 55 else 56 { 57 this.Error = true ; 58 alert( 'Error loading "' + urlToCall + '"' ) ; 59 } 60 } 61 62 FCKXml.prototype.SelectNodes = function( xpath, contextNode ) 63 { 64 if ( this.Error ) 65 return new Array() ; 66 67 if ( contextNode ) 68 return contextNode.selectNodes( xpath ) ; 69 else 70 return this.DOMDocument.selectNodes( xpath ) ; 71 } 72 73 FCKXml.prototype.SelectSingleNode = function( xpath, contextNode ) 74 { 75 if ( this.Error ) 76 return ; 77 78 if ( contextNode ) 79 return contextNode.selectSingleNode( xpath ) ; 80 else 81 return this.DOMDocument.selectSingleNode( xpath ) ; 82 } 83 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |