Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax 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
Thread Tools Display Modes
  #1 (permalink)  
Old September 26th, 2006, 05:47 AM
pbb pbb is offline
Registered User
Join Date: Sep 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default newbie question

Hi all,

I've got the following code, which results in an error "object doesn't support this property or method" on the this.onready() line:

function Foo() {
    this.site = "http://www.google.com";
    this.onready = function(text) {
        // do response processing here
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.open("GET", this.site, true);
    xmlhttp.onreadystatechange = function() { 
        if (xmlhttp.readyState == 4) {
            var text = xmlhttp.responseBody;
            // Object doesn't support this property or method

objFoo = new Foo();
Basically what I want to do is create an object that contains all information for the XHR, including processing functionality. What am I doing wrong?

Thanks, Peter
Reply With Quote

Thread Tools
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
Newbie question savoym JSP Basics 1 August 16th, 2006 03:15 AM
Newbie Question - Sorry! KP Crystal Reports 1 June 13th, 2006 02:45 AM
C# Newbie Question jazzcatone ASP.NET 2.0 Basics 1 May 25th, 2006 10:18 PM
newbie question Warbird XML 0 May 11th, 2005 08:41 AM
Newbie question maccer88 Access 1 October 18th, 2003 05:53 PM

All times are GMT -4. The time now is 11:16 PM.

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