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

Re: problem with smarty literal tag

Expand Messages
  • kumar_namburu
    Hi, Smarty will execute the files in the server it self and return the values(if any) to the html page ie., browser. If you write same in the javascript file
    Message 1 of 5 , Sep 9, 2007
    • 0 Attachment
      Hi,

      Smarty will execute the files in the server it self and return the
      values(if any) to the html page ie., browser. If you write same in
      the javascript file it will not execute.it will give the problem, i
      think it made sense to you

      bye.


      --- In bang-phpug@yahoogroups.com, "bhavna_coolinus"
      <bhavna_coolinus@...> wrote:
      >
      > Hi all,
      >
      > I am using smarty with php. problem is literal tag in javascript
      > (.js) file has not been recognised.
      > e.g1:
      > {literal}
      > <script language="JavaScript" type="text/javascript"
      > src="../js/jsfile.js"></script>
      > {/literal}
      >
      > But if i use it directly(inline) into my head file it is working
      > e.g2:
      > {literal}
      > <script language="JavaScript" type="text/javascript" >
      > function something(){
      > if(document.changePass.oldPassword.value == ""){
      > alert("{/literal}{#errenterOldPass#}{literal}");
      > document.changePass.oldPassword.focus();
      > return false;
      > }
      > }
      > </script>
      > {/literal}
      >
      > In e.g1 it is displaying as "{/literal}{#errenterOldPass#}
      {literal}"
      > but in e.g2 its displaying propere word from conf file.
      >
      >
      >
      > Please give me suggetion of this as soon as possible if you know
      it.
      >
      > Thanks,
      > Bhavna.
      >
    • Pritesh Loke
      Hello When u want to include script dont used literal ... Thank you PML kumar_namburu wrote: Hi,
      Message 2 of 5 , Sep 9, 2007
      • 0 Attachment
        Hello
        When u want to include script dont used literal

        > <script language="JavaScrip t" type="text/javascri pt"
        > src="../js/jsfile. js"></script>
        >
        >
        > But if i use it directly(inline) into my head file it is working
        > e.g2:
        > {literal}
        > <script language="JavaScrip t" type="text/javascri pt" >
        > function something(){
        > if(document. changePass. oldPassword. value == ""){
        > alert("{/literal} {#errenterOldPas s#}{literal} ");
        > document.changePass .oldPassword. focus();
        > return false;
        > }
        > }
        > </script>
        > {/literal}

        Thank you
        PML

        kumar_namburu <kumar_namburu@...> wrote: Hi,

        Smarty will execute the files in the server it self and return the
        values(if any) to the html page ie., browser. If you write same in
        the javascript file it will not execute.it will give the problem, i
        think it made sense to you

        bye.

        --- In bang-phpug@yahoogroups.com, "bhavna_coolinus"
        <bhavna_coolinus@...> wrote:
        >
        > Hi all,
        >
        > I am using smarty with php. problem is literal tag in javascript
        > (.js) file has not been recognised.
        > e.g1:
        > {literal}
        > <script language="JavaScript" type="text/javascript"
        > src="../js/jsfile.js"></script>
        > {/literal}
        >
        > But if i use it directly(inline) into my head file it is working
        > e.g2:
        > {literal}
        > <script language="JavaScript" type="text/javascript" >
        > function something(){
        > if(document.changePass.oldPassword.value == ""){
        > alert("{/literal}{#errenterOldPass#}{literal}");
        > document.changePass.oldPassword.focus();
        > return false;
        > }
        > }
        > </script>
        > {/literal}
        >
        > In e.g1 it is displaying as "{/literal}{#errenterOldPass#}
        {literal}"
        > but in e.g2 its displaying propere word from conf file.
        >
        >
        >
        > Please give me suggetion of this as soon as possible if you know
        it.
        >
        > Thanks,
        > Bhavna.
        >






        PML

        ---------------------------------
        Building a website is a piece of cake.
        Yahoo! Small Business gives you all the tools to get online.

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.