Ajaxthe 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 .
Hi guys,
I've been trying to do this for a few days now, but i can't figure it out. My question is simple: i want to assign to the function 'onreadystatechange' of my XMLHttpRequest object, a function that recieves a parameter. The reason is that i have many calls, each should deal with a different DOM object, and i need to specify which.
You can do this in non-IE browsers by simply adding your own property onto the XHR class before sending the request, in IE you can't do that as COM doesn't support expando properties. An alternative solution can be found in Professional Ajax, 2nd Edition, there's a chapter that covers managing multiple requests, it's quite complicated but works well.