Wrox Programmer Forums
|
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
 
Old May 25th, 2007, 04:46 PM
tal tal is offline
Authorized User
 
Join Date: Apr 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

 
Old May 26th, 2007, 01:40 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
 
Old May 26th, 2007, 06:03 AM
tal tal is offline
Authorized User
 
Join Date: Apr 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Joe, is that the book by "Wrox" ?


 
Old May 26th, 2007, 06:17 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Yes, published recently.

--

Joe (Microsoft MVP - XML)
 
Old May 26th, 2007, 07:34 AM
tal tal is offline
Authorized User
 
Join Date: Apr 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks again :)
I got the book, could you please point me to the right location (i'm new to web programming...:()

 
Old May 26th, 2007, 08:07 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Chapter 5.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameters fizzerchris Access VBA 5 August 31st, 2007 12:16 PM
Passing more than one parameters from datagrid Lyn ASP.NET 1.0 and 1.1 Professional 6 August 29th, 2006 02:30 AM
Passing parameters ceema Crystal Reports 0 February 15th, 2006 04:03 AM
Passing Parameters spraveens Javascript 5 October 8th, 2003 07:06 AM
passing parameters spraveens Javascript How-To 1 October 8th, 2003 03:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.