p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

Free Code from Wrox
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 computer programmers 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 programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 25th, 2009, 04:16 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 26th, 2009, 06:38 PM
jmcpeak's Avatar
Wrox Author
Points: 136, Level: 2
Points: 136, Level: 2 Points: 136, Level: 2 Points: 136, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2005
Location: , Texas, USA.
Posts: 35
Thanks: 0
Thanked 2 Times in 2 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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 26th, 2009, 07:37 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 2 February 5th, 2010 09:38 AM
zXML library errors, questions triptone BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 0 October 24th, 2008 06:44 AM
Permission problem encountered with xmlHTTPrequest x684867 Classic ASP XML 0 July 18th, 2008 09:19 AM
Problem with zxml Library anujrathi BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 October 30th, 2007 01: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 08:12 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2010 Wiley Publishing, Inc