Ok I think I got the log in working now, but the next question I have
is how to to send them to a new page if they are logged in. 

--- In [email protected], "Malcolm" <[EMAIL PROTECTED]> wrote:
> Have you tried passing a NULL as your last argument? I know this sounds
> strange, but it works when using remote objects (AMF), not too sure
if the
> same goes for cf web services.
> 
> Thus your call in as will look like this:
> 
> srv.qpUserLogin(usr, pss, NULL);
> 
> And in your cfc arguments define a 'FlexNULL' or something similar:
> 
> <cffunction name="qpUserLogin" access="remote" hint="from
> tbl_smartPanel_users" returnType="string" output="false">
>       <cfargument name="usr" type="string" required="true" />
>       <cfargument name="pss" type="string" required="true" />
>       <cfargument name="FlexNull" type="any" required="no" default="">
> 
> 
>       <!--- your code here --->
> 
> </cffunction>
> 
> Post on it here:
> 
>
http://www.flexingcfmx.com/index.cfm?mode=entry&entry=D36D5CE5-FB00-283B-A23
> A89CB46949A4D
> 
> Hope this helps :]
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jeremy Rottman
> Sent: Tuesday, 13 September 2005 7:56 AM
> To: [email protected]
> Subject: [flexcoders] userlogin
> 
> I am working on a simple test user login, and I am having a butt load
> of trouble with it. When I test the code, it tells me that element usr
> is undefined in my argument. You can see the file here. Does anyone
> know of a tutorial using cf?
> http://70.97.113.6/flex/
> 
> Here is my code.
> 
> CF--
> <cffunction name="qpUserLogin" access="remote" hint="from
> tbl_smartPanel_users" returnType="string" output="false">
>               <cfargument name="usr" type="string" required="true" />
>               <cfargument name="pss" type="string" required="true" />
>               <!-- Query for pulling userinfo based on what was passed
> from as -->
>               <cfquery name="qpGetLogin" datasource="#application.dsn#">
>               select * from tbl_smartPanel_userList
>               where fld_userlogin='#argument.usr#'            
>               and fld_userpass='#argument.pss#'
>               </cfquery>
>               <cfif qSecurity.recordcount gt 0>
>                       <cfset access="T">
>               <cfelse>
>                       <cfset access="F">
>               </cfif>
>               
>       
>               <cfreturn access />
> 
>       </cffunction>   
> 
> AS--
> // ActionScript Document
> 
> function qpUserLogin(usr, pss) {
> srv.qpUserLogin(usr, pss);
> }
> 
> Flex--
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>
> <mx:WebService id="srv"
> wsdl="http://70.97.113.6/test/smartPanel.cfc?wsdl";>
> </mx:WebService>
> <mx:Script source="login.as" />
> <mx:Form>
> <mx:FormItem label="Username" required="true">
> <mx:TextInput id="usr" />
> </mx:FormItem>
> 
> <mx:FormItem label="Password" required="true">
> <mx:TextInput id="pss" />
> </mx:FormItem>
> </mx:Form>
> 
> <mx:ControlBar horizontalAlign="right">
> <mx:Button label="Submit"
> click="qpUserLogin(usr.text, pss.text);" />
> </mx:ControlBar>
> </mx:Application>
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to