Because you're posting to temp.cfc directly, not the temp.cfc you've loaded
into the session scope.

Rick


On 3/8/07, joe smiths <[EMAIL PROTECTED]> wrote:
>
> Given the files below - why does update1() fail to update the cfc
> property?
>
> file TEMP.CFM:
> <cfoutput>
> <cfif not isDefined("session.temp")>
> <cfset session.temp=#createObject('component','temp')#>
> </cfif>
> <html>
> <head>
> <title>temp</title>
> </head>
> <body>
>
> <form method="post" action="temp.cfc?method=update1">
> update1:
> <select name="tableName" onChange="this.form.submit()">
>    <option></option>
>    <option <cfif session.temp.tableName eq
> "table1">selected</cfif>>table1</option>
>    <option <cfif session.temp.tableName eq
> "table2">selected</cfif>>table2</option>
>    <option <cfif session.temp.tableName eq
> "table3">selected</cfif>>table3</option>
> </select>
> </form>
>
> <form method="post" action="temp.cfc?method=update2">
> update2:
> <select name="tableName" onChange="this.form.submit()">
>    <option></option>
>    <option <cfif session.temp.tableName eq
> "table1">selected</cfif>>table1</option>
>    <option <cfif session.temp.tableName eq
> "table2">selected</cfif>>table2</option>
>    <option <cfif session.temp.tableName eq
> "table3">selected</cfif>>table3</option>
> </select>
> </form>
>
> session.temp.tableName=#session.temp.tableName#
>
> </body>
> </html>
> </cfoutput>
>
> file TEMP.CFC:
> <cfcomponent>
>
> <cfset this.tableName="">
>
> <cffunction name="update1" access="remote">
> <cfargument name="tableName" required="yes">
>
> <cfset this.tableName=arguments.tableName>
>
> <cflocation url="temp.cfm" addToken="no">
> </cffunction>
>
> <cffunction name="update2" access="remote">
> <cfargument name="tableName" required="yes">
>
> <cfset session.temp.tableName=arguments.tableName>
>
> <cflocation url="temp.cfm" addToken="no">
> </cffunction>
>
> </cfcomponent>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272061
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to