how are you calling up the thickbox modal window?
if it's a js function/jquery event binding that opens the modal on click
of a link, just pass the id you retrieved to it and append it to the url
string, i.e.:

$("a.editManager").click(function() {
  var id = $(this).arrt('id');
  tb_show("EditSitemanager",
"../modals/siteManagerEditForm.cfm?height=425&width=500&modal=true&id="+id,
false);
  }
);


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/


On 19/06/2009 22:53, Rick Faircloth wrote:
> I think I'm having one of those "duh" moments...but what can I do...
> 
> I'm trying to change all my content management functions to use modal
> windows.
> 
> I'm at the "update record" part now.
> 
> What I can't seem to figure out is how to get the recordID (managerID, in
> this case) into my modal window for use.
> 
> I start with a .cfm page, which includes a call to the component method to
> retrieve all manager records:
> 
> <cfinvoke  component             =
> "hdspa-sm.components.siteManagerProcessor"
>                method                   =   "mGetAllSiteManagers"
>                returnVariable          =   "qGetAllSiteManagers"
>                dsn                         =   "#application.dsn#"
>                orderBy                   =   "lastName">
> 
> That info is output in a table, which includes this piece of code:
> 
> <cfoutput>
>      <a id="#managerID#" class" link editManager">edit</a>
> </cfoutput>
> 
> Now, using jQuery, I can get the managerID from the id of the link above
> this way:
> 
> var managerID = $(this).attr('id')
> 
> Now, I've defined the managerID.
> 
> But I'm still on the main record update page.  I now want to open a modal
> window
> and use that managerID to run an ajax function to retrieve the entire
> manager record
> and populate an update form in the modal window.
> 
> But I just can't see how to transfer the managerID from the main page to the
> modal window.
> 
> Is there some way to include that variable in the code I use to open the
> modal window (Thickbox)?
> tb_show("EditSitemanager",
> "../modals/siteManagerEditForm.cfm?height=425&width=500&modal=true",
> false);
> I don't see how...
> 
> Do I need to assign the managerID to a session variable?  (I really dislike
> having to use
> session variables like that...global variables are too hard to track between
> cf and js, etc.)
> 
> I know that CF 8 does this with CFWindow or whatever is uses, but how does
> it transfer
> variables between the calling page and modal windows?
> 
> Suggestions for one who is "lost in the sauce..." ???
> 
> Thanks,
> 
> Rick
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323704
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to