p2p.wrox.com 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

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: 130, Level: 2
Points: 130, Level: 2 Points: 130, Level: 2 Points: 130, Level: 2
Activity: 10%
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Nov 2005
Location: , Texas, USA.
Posts: 33
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 library errors, questions triptone BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 0 October 24th, 2008 06:44 AM
zxml.js library for firefox 3.0 manahual BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 August 13th, 2008 01:53 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 02:33 AM.


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