|
Mailing Lists
|
Home /
Groups /
JQuery
Template-Invalid CFML construct found
Hi All,sowjanya Mathi 03/21/11 06:57 A Remember that CF treats # as a variable marker:Raymond Camden 03/21/11 09:41 A Hi All, I am using the following code in cfif. <cfif not IsDefined("cookie.savePassword")> <script> $(document).ready(function() { $('.clean').focusin(function() { var val= $(this).attr('value'); if( $(this).val()=='Your email' ){ $(this).attr('value','');} }); $('#formLogin').submit(function(event) { var check=true; $('.clean').each(function() { if( $(this).val()=='' || $(this).val()=='Your email' ){check=false;} }); if(check==false){ alert("Please check your e-mail and password."); event.preventDefault(); } }); }); </script> </cfif> I am getting the error:Template-Invalid CFML construct found at the following line $('#formLogin').submit(function(event) { error description is:Your expression might be missing an ending "#" (it might look like #expr ). Anyone help me on this? Remember that CF treats # as a variable marker: <cfoutput>#foo#</cfoutput> So if you want a # by itself, you 'escape' it by doubling it: ## Example: $('##formLogin').submit(function(event) { This only matters inside a cfoutput of course. ----- Excess quoted text cut - see Original Post for more -----
|
May 25, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||