House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  JQuery

Template-Invalid CFML construct found

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hi All,
sowjanya Mathi
03/21/11 06:57 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
sowjanya Mathi
03/21/2011 06:57 AM

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?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
03/21/2011 09:41 AM

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 -----


<< Previous Thread Today's Threads Next Thread >>

Search jquery

May 25, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference