File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Passing Variables Through Callback Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Passing Variables Through Callback" Watch "Passing Variables Through Callback" New topic

Passing Variables Through Callback

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

I'm trying to go through some of my code and get rid of some duplicate boilerplate. Through out my app, I need to confirm certain things, like deleting. So I have something like far...See the comments in the live click event for what I actually need to do.

GenRocket - Experts at Building Test Data
Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

What if you add the two values as parameter to showConfirmDialog method and pass it to the callback (I'm no javascript guru so this might be a wrong solution)

Edit: I'm completely sure now that this post is useless, changing the parameters of showConfirmDialog/confirmRemoveMember must not be a choice...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

Right, because not everything I use a confirm for uses those parameters.
I agree. Here's the link:
subject: Passing Variables Through Callback
Similar Threads
Replacing Element Body with jQuery.load(), What Happens To Old Elements?
DWR callback updating dom elements, jquery ui datepicker attached to updated element not showing up
Passing arguments to function passed to event click function.
JQuery.UI Dialog & $().load() & JavaScript
Grails Tutorials Available.