| Author |
prototype Ajax onComplete
|
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Say I have the following: Is there anyway to pass the redirect variable on to completeSaveArticleRequest?
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
try to replace completeSaveArticleRequest with function(){completeSaveArticleRequest(redirect);} Not sure if it will work, brain is on vacation at the moment. Eric
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Will I need to pass anything else so that it gets the response object? Something like that?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56204
|
|
Because you have created a closure with your inline function, it will have access to all the variables in scope for the block in which it is declared including myAjax (but not the this pointer). [ July 12, 2006: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Originally posted by Bear Bibeault: Because you have created a closure with your inline function, it will have access to all the variables in scope for the block in which it is declared including myAjax (but not the this pointer). [ July 12, 2006: Message edited by: Bear Bibeault ]
Ahh, thanks.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
whoops should be function(req){completeSaveArticleRequest(req,redirect);} than do it the way you were saying Eric
|
 |
 |
|
|
subject: prototype Ajax onComplete
|
|
|