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
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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 25th, 2007, 04:46 PM
tal tal is offline
Authorized User
 
Join Date: Apr 2007
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old May 26th, 2007, 01:40 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 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)
Reply With Quote
  #3 (permalink)  
Old May 26th, 2007, 06:03 AM
tal tal is offline
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Reply With Quote
  #4 (permalink)  
Old May 26th, 2007, 06:17 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 Posts
Default

Yes, published recently.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #5 (permalink)  
Old May 26th, 2007, 07:34 AM
tal tal is offline
Authorized User
 
Join Date: Apr 2007
Location: , , .
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...:()

Reply With Quote
  #6 (permalink)  
Old May 26th, 2007, 08:07 AM
joefawcett's Avatar
Wrox Author
Points: 9,712, Level: 42
Points: 9,712, Level: 42 Points: 9,712, Level: 42 Points: 9,712, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,066
Thanks: 1
Thanked 36 Times in 35 Posts
Default

Chapter 5.

--

Joe (Microsoft MVP - XML)
Reply With Quote
Reply


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
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 03: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



All times are GMT -4. The time now is 09:50 AM.


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