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 May 25th, 2009, 03:16 PM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default zxml library XMLHttpRequest() problem

I have been using the excellent zxml library for the last year so on a site hosted on Ubunu 6.04. I have now migrated to Ubuntu 8.04 and the Ajax now fails. I have narrowed the problem to the line:-

Code:
        return new XMLHttpRequest();
in zxml.js. Using IE8 I get the error "Object doesn't suppot this property or method" (IE7 gave similar error). Strangely, if after loading the page I 'refresh' the browser the code then works.

Can anyone explain what is going on here?

Thanks.
Reply With Quote
  #2 (permalink)  
Old May 26th, 2009, 05:38 PM
jmcpeak's Avatar
Wrox Author
Points: 467, Level: 7
Points: 467, Level: 7 Points: 467, Level: 7 Points: 467, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2005
Location: , Texas, USA.
Posts: 87
Thanks: 0
Thanked 18 Times in 17 Posts
Default

Howdy, dastard.

I can't think of anything off the top of my head that would cause this. Can you provide a link to the page giving you the error?
Reply With Quote
  #3 (permalink)  
Old May 26th, 2009, 06:37 PM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying Jeremy. I seem to have inadvertently found the solution myself. The page is on an intranet and on trying to find the minimum code to replicate the problem I found that
Code:
<html>
<head>
<title>Ajax test</title>
<script type="text/javascript"src="js/zxml.src.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script language="javascript" type="text/javascript">
    var oXHR = zXmlHttp.createRequest();   
</script>
</head>
gives an error whilst
Code:
<html>
<head>
<title>Ajax test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript"src="js/zxml.src.js"></script>
<script language="javascript" type="text/javascript">
    var oXHR = zXmlHttp.createRequest();   
</script>
</head>
is ok.

Thus calling the js library before the meta tag does not work. Perhaps this is to be expected - I don't know. Perhaps you could comment? Anyway it's working now!

Thanks again,
Dastard
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 library for firefox 3.0 manahual BOOK: Professional Ajax ISBN: 978-0-471-77778-6 4 March 2nd, 2010 04:59 AM
zXML library errors, questions triptone BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 0 October 24th, 2008 05:44 AM
Permission problem encountered with xmlHTTPrequest x684867 Classic ASP XML 0 July 18th, 2008 08:19 AM
Problem with zxml Library anujrathi BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 October 30th, 2007 12:37 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 05:52 PM.


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