Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Custom properties on xmlhttp object

    Say x in a XML Http Request Object ... meaning it's either XMLHttpRequest (firefox) or ActiveXObject (IE)

    This line of code works in firefox...
    Code:
    x.someProp = "someValue";
    alert(x.someProp);
    But in IE I get "Object doesn't support this property or method"
    I need to place a custom property on the object.
    Is there any way I can do that in IE?

    I've already tried
    Code:
    ActiveXObject.prototype.someProp = "";
    That doesn't seem to work in IE.
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You can not extend the object with IE.

    You should look at coding with OO JavaScript instead of trying to do something similiar with this custom property,

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •