how to use coldfusion function in onfocus event ?
i have a username field in my form and i want to check the enter value on my database realtime to find if there is duplicate , can u please tell me how i can do it ?
<form name="login" action="savedata.cfm" >
<input type="text" onfocus="call any coldfusion function " name="username">
</form>
i need the the function to be call inside from to check :
| <CFQUERY Name="admin" DATASOURCE="#request.tvgo_datasource#" USERNAME="#request.tvgo_db_username#" PASSWORD="#request.tvgo_db_password#"> | |
| select * from admin where username='#pass_value#' | |
| </CFQUERY> |
<cfif admin.recordcount gt 0>
FALSE condition ( and return false )
<cfelse >
true condition
</cfif>
