Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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.
  #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?
  #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


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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.