Javascript and smarty... please help!!

Discussion in 'JavaScript' started by easydolla, Dec 23, 2008.

  1. #1
    God I have been trying to figure this out for ever. I have js popunder script which I am need to use on my dynamic website. It doesnt work unless its on a static page.


    The only way I thought I could implement it was by inserting the code into the footer, home, or header files

    But it still doesnt work


    I tried everything, after </head> , even in the javascript includes section, just wont work! I either get the smarty compiler error or it doesnt work


    can somebody PLEASE FING HELP ME

    thanks :D
     
    easydolla, Dec 23, 2008 IP
  2. ing

    ing Well-Known Member

    Messages:
    500
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    195
    #2
    Did you try putting your javascript code within {literal} {/literal} tags?

    
    {literal}
       <script language="javascript">
       ......
       </script>
    {/literal}
    
    Code (markup):
     
    ing, Dec 23, 2008 IP
  3. easydolla

    easydolla Peon

    Messages:
    403
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the help but it didnt work =/
     
    easydolla, Dec 24, 2008 IP
  4. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #4
    They seem to be two different issues.

    If you get Smarty compiler error, most probably you have curly brackets ('{' or '}') that you didn't place inside a {literal}...{/literal} block.

    If it doesn't work, then something in the JavaScript or HTML is wrong. What it is, I can't tell without knowing the error message and probably the actual code too.
     
    phper, Dec 28, 2008 IP
  5. hackfanatic

    hackfanatic Peon

    Messages:
    29
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    literal usually works, but if not try this

    { = {ldelim}
    } = {rdelim}

    but this gets kinda irritating though .. cos you gotta replace all the curly braces with the codes.

    anyway. give it a shot, ;)
     
    hackfanatic, Dec 29, 2008 IP