Heya Andrew,

You need to refer to the passed parameter as:
"#attributes.SelectedOfficeID#"

You might want to type check it, and set it to a local variable as
well first.

bye!


Thursday, January 22, 2004, 9:29:23 AM, you wrote:

AD> My first tag is not going according to plan.

AD> I'm attempting to reuse this code :

AD> <cfoutput>
AD>         <cfquery name="getOfficeLocs" datasource="mydata">
AD>                 SELECT YOfficeID AS SelectedOfficeID, OfficeName
AD>                 FROM    YesOffices
AD>                 WHERE   Active = 1
AD>                 ORDER BY OfficeName 
AD>         </cfquery>
AD>         <cfquery name="getSelectedOffice" datasource="mydata">
AD>                 SELECT YOfficeID AS SelectedOfficeID, OfficeName
AD>                 FROM YesOffices
AD>                 WHERE Active = 1
AD>                         and Yofficeid=#SelectedOfficeID#
AD>         </cfquery>
AD> </cfoutput>

AD> ... which sets up for a dropdown menu.

AD> I've saved this code as SelectOffices.cfm, and called it as <cf_selectoffices> - 
this is as
AD> the CFMX reference manual suggests.

AD> The problem seems to be the parameter. When I modify the call to
AD> <cf_selectoffices SelectedOfficeID="#SelectedOfficeID#">
AD> it falls over, pointing to an error on this line
AD> "and Yofficeid=#SelectedOfficeID#"

AD> So I went back to the book and followed the starter example, wihch simply
AD> creates a file called date.cfm containing today's date, then calls <cf_date> from a
AD> different program. This works. However, when I try to pass a parameter,
AD> any parameter, using any of the methods in the book, it doesn't work (i.e
AD> throws an error).

AD> What am I missing here ?







AD> ---
AD> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
AD> To unsubscribe send a blank email to [EMAIL PROTECTED]

AD> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
AD> http://www.mxdu.com/ + 24-25 February, 2004


-----------------------
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig 


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to