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

Re: [bang-phpug] problem with smarty literal tag

Expand Messages
  • bhavna patel
    hey, I have already included conf file in my header.tpl file so it will be available in every files. and that is why the second statement runs. but i dont know
    Message 1 of 5 , Aug 6, 2007
      hey,

      I have already included conf file in my header.tpl file so it will be available in every
      files. and that is why the second statement runs. but i dont know why the first one is not working. or its like I have to incldue conf file in JS file too.

      Please let me know, if you have more idea bout it,
      Thanks,
      Bhavna.

      ----- Original Message ----
      From: ganu <ganu.ullu@...>
      To: bang-phpug@yahoogroups.com
      Sent: Monday, August 6, 2007 7:21:08 PM
      Subject: Re: [bang-phpug] problem with smarty literal tag

      hey,

      I am not sure I am write or wrong.
      But see as you are telling that your first statement is printing as
      {#errenterOldPass# }

      now the smarty docs says if you have say foo.conf then it will take the
      value from there. Now you are trying to run /js/some_jsfile. js so the
      program is not able to get that where is your conf is declared. So its
      displaying as it is. else if the program is able to get the conf value then
      it will print , that is what happening in your second case.

      Or you can try the first statement with option might be this will work.
      {config_load file="myfoo. conf"}

      --
      ganu.

      On 8/6/07, bhavna_coolinus <bhavna_coolinus@ yahoo.com> 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="JavaScrip t" type="text/javascri pt"
      > 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="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}
      >
      > 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.
      >
      >
      >

      [Non-text portions of this message have been removed]






      ____________________________________________________________________________________
      Pinpoint customers who are looking for what you sell.
      http://searchmarketing.yahoo.com/

      [Non-text portions of this message have been removed]
    • 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 2 of 5 , Sep 9, 2007
        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 3 of 5 , Sep 9, 2007
          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.