Nate,

Here's a really simple, one page Fusebox app that handles both client 
and server FusionScript code. Bear in mind two things:

(1) Obviously, in a real FB app, the code inside the CFCASE statements 
would be included as dsp_ or act_ files.

(2) The example depends upon the getAttributes.cfm changes I proposed 
over on the FusionScript list... it'll fail without them.

--
Roger

=========
index.cfm
=========

<cf_fs_activeserver action="getAttributes">
<cfparam name="attributes" default="#structnew()#">
<cfset dummy = StructAppend(attributes, url, "no")>
<cfset dummy = StructAppend(attributes, activeserver, "no")>

<cfparam name="attributes.fuseaction" default="showName">

<cfswitch expression="#attributes.fuseaction#">

        <cfcase value="showName">
                <cf_fs_activeserver action="initialize">

                <cf_fusionScript action="code">

                        <cf_fusionScript action="libraries">
                                form.*
                        </cf_fusionScript>

                        <cf_fs_function name="updateName">
                                <cf_fs_activeServer action="call"
                                        page="index.cfm"
                                        fuseaction="'modifyName'"
                                        userinput="form.mytext">
                                alert(thisname);
                        </cf_fs_function>

                </cf_fusionScript>

                <html><body>
                <form>
                        <input type="text" name="mytext">
                        <input type="submit" value="Click Me" 
onclick="updateName();return 
false;">
                </form>
                </body></html>
        </cfcase>

        <cfcase value="modifyName">
                <cfset myvar = "The message is: " & UCase(activeserver.userinput)>
                <cf_fs_activeserver action="return"
                        name="thisname"
                        value="#myvar#">
        </cfcase>

</cfswitch>

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to