 |
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

May 25th, 2007, 04:46 PM
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Passing parameters
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.
Help anyone 
|

May 26th, 2007, 01:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
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.
--
Joe ( Microsoft MVP - XML)
|

May 26th, 2007, 06:03 AM
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Joe, is that the book by "Wrox" ?
|

May 26th, 2007, 06:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Yes, published recently.
--
Joe ( Microsoft MVP - XML)
|

May 26th, 2007, 07:34 AM
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks again :)
I got the book, could you please point me to the right location (i'm new to web programming...:()
|

May 26th, 2007, 08:07 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Chapter 5.
--
Joe ( Microsoft MVP - XML)
|
|
 |