PHPTAL and JavaScript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • willl69

    #1

    PHPTAL and JavaScript

    Hi

    I have a problem when i try to output javascript code through phptal the "
    quotes come out as &quot and thus wont execute in the browser.

    An Example:

    <script language="JavaS cript">

    function hide() {
    field.style.dis play = "block";
    }
    </script>

    Comes out as...

    <script language="JavaS cript">

    function hide() {
    field.style.dis play = &quotblock&quot ;
    }
    </script>

    in the source. Was wondering if anyone knows how to fix this problem.

    Cheers

    Will

  • Alvaro G Vicario

    #2
    Re: PHPTAL and JavaScript

    *** willl69 wrote/escribió (Mon, 27 Jun 2005 21:54:22 -0400):[color=blue]
    > Comes out as...
    >
    > <script language="JavaS cript">
    >
    > function hide() {
    > field.style.dis play = &quotblock&quot ;
    > }
    > </script>[/color]

    Have you tried hiding non-HTML parts with HTML comments?

    <script type="text/javascript"><!--
    function hide() {
    field.style.dis play = &quotblock&quot ;
    }
    //--></script>


    --
    -- Álvaro G. Vicario - Burgos, Spain
    -- http://bits.demogracia.com - Mi sitio sobre programación web
    -- Don't e-mail me your questions, post them to the group
    --

    Comment

    Working...