actually, since you are using thickbox, you can just modify its source
code a bit and have it always return any query string af a url passed to it:

add this line
  var tb_params;
after this line (#8 in my source):
  var tb_pathToImage = "images/loadingAnimation.gif";

and add this line:
  tb_params = params;
after this line (#185 in my source):
  var params = tb_parseQuery( queryString );

now you can access your managerID value in js easily as
tb_params.managerID !


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


On 21/06/2009 22:31, Rick Faircloth wrote:
> Thanks, Azadi!
> 
> It's a little confusing knowing which variables can be treated as CF
> variables and which
> can only be handled as jQuery variables!
> 
> Making good progress now!
> 
> Rick
> 
> On Sun, Jun 21, 2009 at 10:59 AM, Azadi Saryev <[email protected]> wrote:
> 
>> do what you do for your dsn var - use <cfoutput>!
>>
>> var values = {
>>  dsn: '<cfoutput>#application.dsn</cfoutput>',
>>  managerID:  <cfoutput>#url.managerId#</cfoutput>
>> };
>> console.log(values.managerID);
>>
>>
>>
>> Azadi Saryev
>> Sabai-dee.com
>> http://www.sabai-dee.com/
>>
>>
>>  On 21/06/2009 21:23, Rick Faircloth wrote:
>>> Thanks, Azadi...that did the trick...guess i didn't try that option.
>>>
>>> I can get the variable in to the page that is inside the thickbox,
>>> because I can run� <cfoutput>managerID = #url.managerID#</cfoutput>
>>> and get managerID = 1, however I can't find a way to make use of the
>> variable
>>> in jQuery.
>>>
>>> When the page being inserted into the modal window is called, I have a
>>> jQuery function
>>> that runs to retrieve the data from a component method for the record
>>> matching the managerID.
>>> But in the function, I keep getting "managerID is undefined".  Here's
>>> the first part of the function:
>>>
>>> $(document).ready(function(url.managerID) {
>>>
>>>      var values  =  {  dsn:
>>  '<cfoutput>#application.dsn</cfoutput>',
>>>                             managerID:  url.managerId  };
>>>
>>>      console.log(managerID);
>>>      alert('managerID = ' + managerID + 'url.managerID = '
>> +url.managerID);
>>> i've tried various versions of the above code to try to get the
>>> managerID in jQuery,
>>> but nothing has worked so far.
>>>
>>> How can I change this code to retrieve the managerID variable being
>>> sent in the URL?
>>>
>>> Thanks for your help!
>>>
>>> Rick
>>>
>>> On Sun, Jun 21, 2009 at 8:41 AM, Azadi Saryev <[email protected]>
>> wrote:
>>>> the correct way would be:
>>>>
>>>> tb_show("EditSiteManager",
>>>>
>> "../modals/siteManagerEditForm.cfm?height=425&width=500&modal=true&managerID="+thisID,
>>>> false);
>>>>
>>>>
>>>> Azadi Saryev
>>>> Sabai-dee.com
>>>> http://www.sabai-dee.com/
>>>>
>>>>
>>>> On 21/06/2009 18:31, Rick Faircloth wrote:
>>>>> tb_show("EditSiteManager",
>>>>>
>> "../modals/siteManagerEditForm.cfm?height=425&width=500&modal=true&managerID=thisID",
>>>>> false);
>>>
>>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:323752
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