Loading ...
Sorry, an error occurred while loading the content.

3783Re: [Cheetahtemplate-discuss] Placeholder bug?

Expand Messages
  • Tavis Rudd
    Sep 3, 2006
      Hi Michelts,
      to escape a placeholder in Cheetah you just need to add a \ before the $ (\$).
      Thus, if you use:
      var obj2 = \$('obj2')
      it should work fine.
      Cheers,
      Tavis

      On Saturday 02 September 2006 12:08 pm, michelts wrote:
      > Hi Shannon,
      >
      > > Heh, I was thinking of this problem the other day. I have three
      > > suggestions:
      >
      > 1) Get the JavaScript out of the HTML and use a static JavaScript file ;)
      > 2) Create an alias for the $ function in JavaScript.
      > 3) Use \$().
      >
      > I can use a static javascript file, or create an alias to the $
      > function in javascript, but I think this is an alternative solution to
      > the real problem, I think there is a bug in cheetah namemapper. See
      > the following code...
      >
      > var obj2 = $$('obj2');
      >
      > ... that renders...
      >
      > var obj2 = $obj2;
      >
      > I don't know very well where is the problem, but I will see the source
      > code to solve it, I think the proper behavior should be cheetah
      > scaping the dollar sign and do not touching the parentesis, as above:
      >
      > var obj2 = $('obj2');
      >
      > Thanks for all help,
      > Regards.

      -------------------------------------------------------------------------
      Using Tomcat but need to do more? Need to support web services, security?
      Get stuff done quickly with pre-integrated technology to make your job easier
      Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
      http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Show all 6 messages in this topic