Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6
This is the forum to discuss the Wrox book Professional Ajax, 2nd Edition by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780470109496
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 24th, 2008, 05:44 AM
Registered User
 
Join Date: Oct 2008
Location: Szeged, Csongrád, Hungary.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to triptone
Default zXML library errors, questions

Hi!

I have two problems width zxml library. The zxml load() doesn't work under Google Chrome. This is the error message:

uncaught exception TypeError: Property '__load__' of object #<a Document> is not a function

I'm not a professional ajax developer, and I don't want to modify Nicholas code. So i send an example, when i get this message:


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>XMLHttp használata</title>
<script type="text/javascript" src="zxml.js"></script>
<script>
     //ez a metódus inicializálja a környezetet, a body tag kirenderelése közben fut  meg
     function init() {
          //létrehozzuk a DOM dokumentumot
          var oXml = zXmlDom.createDocument();
           //adjuk hozzá az aszinkron esemény kezelo függvényt
           oXml.onreadystatechange = function () {
                 if ( oXml.readyState == 4 ) {
                       if ( oXml.parseError.errorCode == 0 ) {
                            pharsexml(oXml);  
                       } else {
                           //megnézzük bekerült-e
                          alert("Hiba a betöltéskor" + oXml.parseError.reason);    
                       }
                 }
           }
           //töltsük be az xml-t 
           oXml.load("users.xml");
     }   
// csak simán a rootnodeot átadjuk a serilalizernek ezáltal kiverjük a html lapra     
function pharsexml(oXmlDom) {
    var oRoot = oXmlDom.documentElement;

    document.body.innerHTML =   new  zXMLSerializer().serializeToString( oRoot );
}        
</script>
</head>
<body onload="init()">
</body>
</html>
and the users.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>[list]
    <li>Adam</li>
    <li>Judy</li>
    <li>Nicholas</li>
</ul>
It is the simplyest code, when I get this type of error.

The second one is: in opera (9.5 i have), i can't create a new XML DOM object, the message is:
Code:
JavaScript - file://localhost/L:/Szakmai%20Blog/JavaScript/zXML/Examples/Examples/zXmlDOM.htm
Inline script thread
Error:
name: TypeError
message: Statement on line 1: Type mismatch (usually non-object value supplied where object required)
Backtrace:
  Line 1 of linked script file://localhost/L:/Szakmai%20Blog/JavaScript/zXML/Examples/Examples/zxml.js
    function(){if(zXml.useDom){var oXmlDom=document.implementation.createDocument("","",null);oXmlDom.parseError={valueOf:function(){return this.errorCode;},toString:function(){return this.errorCode.toString()}};oXmlDom.__initError__();oXmlDom.addEventListener("load",function(){this.__checkForErrors__();this.__changeReadyState__(4);},false);return oXmlDom;;}else if(zXml.useActiveX){if(!zXml.DOM_VER){for(var i=0;i<zXml.ARR_DOM_VERS.length;i++){try{new ActiveXObject(zXml.ARR_DOM_VERS[i]);zXml.DOM_VER=zXml.ARR_DOM_VERS[i];break;}catch(oError){;}}}if(zXml.DOM_VER){return new ActiveXObject(zXml.DOM_VER);}else{throw new Error("Could not create XML DOM document.");}}else{throw new Error("Your browser doesn't support an XML DOM document.");}}
  Line 3 of inline#1 script in file://localhost/L:/Szakmai%20Blog/JavaScript/zXML/Examples/Examples/zXmlDOM.htm
         var oXml = new zXmlDom.createDocument();
stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
Anyone know solutions?
P.S.: Sorry my terrible english.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
zxml.js errors? Richard Frainier BOOK: Professional Ajax ISBN: 978-0-471-77778-6 4 April 13th, 2015 01:57 AM
zxml.js library for firefox 3.0 manahual BOOK: Professional Ajax ISBN: 978-0-471-77778-6 4 March 2nd, 2010 04:59 AM
Problem with zxml Library anujrathi BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 October 30th, 2007 12:37 PM
zXML zXMLSerializer minor errors AGS BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 October 29th, 2006 03:36 PM
zxml library keodark BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 February 14th, 2006 07:05 PM



All times are GMT -4. The time now is 10:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.