javascript - log into ColdFusion site from JS-based AIR app? -


i have following coldfusion code on server (which i'm not able change) :

<cfquery name="getlogin" datasource="#application.dsn#">         select *          tbl_useraccount         username = <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.username#"/> , password = <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.password#"/> , siteid = <cfqueryparam cfsqltype="cf_sql_integer" value="#application.siteid#"/>     </cfquery> 

and i'm trying build javascript window logging adobe air app.

specifically, want send user credentials (uname , pword), , bring account id (which included in 'select *' statement).

can me started this?

a quick dirty way started drop query method in cfc.

that method take 2 parameters username , password. replace form variables in cfqueryparms appropriate arguments on method.

on method should set return type numeric , returnttype json. you'll able call method in cfc ajax post accepting account id. use cfc webservice.

things you'll need validating username , password, returning 0 or negative number if don't single record returned query, take * out of select , return account id.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -