aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes prototype Ajax onComplete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "prototype Ajax onComplete" Watch "prototype Ajax onComplete" New topic
Author

prototype Ajax onComplete

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Say I have the following:



Is there anyway to pass the redirect variable on to completeSaveArticleRequest?


GenRocket - A Test Data Generation Platform
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
try to replace

completeSaveArticleRequest

with

function(){completeSaveArticleRequest(redirect);}

Not sure if it will work, brain is on vacation at the moment.

Eric
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

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: 60055
    
  65

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

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: 15376
    
    6
whoops

should be

function(req){completeSaveArticleRequest(req,redirect);}

than do it the way you were saying

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: prototype Ajax onComplete
 
Similar Threads
JavaScript error - no data
[Grails + AJAX] Chained selection
Notify Users before session expires
Question about <c:param> in JSTL
json.js and prototype.js not working in my screen