Execute a JavaScript with PHP??

Discussion in 'OT Technology' started by LEGbEND, Aug 17, 2004.

  1. LEGbEND

    LEGbEND .

    Joined:
    Jun 26, 2001
    Messages:
    23,270
    Likes Received:
    6
    Location:
    Shitcago
    I've been on Google for over an hour looking for this...

    I have a PHP case statement. I want it to run a certain JS function ( called slideEm('glideDiv0') ) when a case is set/activated/whatever...

    so itd be:
    switch($doc)
    {
    case "education":

    echo "education";

    slideEm('glideDiv0');

    break;
    }

    or something like that... possible?
     
  2. schmack

    schmack Professional Lurker OT Supporter

    Joined:
    Mar 12, 2003
    Messages:
    1,661
    Likes Received:
    13
    Wouldn't you need to write the javascript to the page?

    switch($doc){
    case "education":
    echo "education";
    echo "<script>slideEm('glidDiv0')</script>";
    break;
    }
     
  3. LEGbEND

    LEGbEND .

    Joined:
    Jun 26, 2001
    Messages:
    23,270
    Likes Received:
    6
    Location:
    Shitcago
    :dunno: i'll try it...
     
  4. LEGbEND

    LEGbEND .

    Joined:
    Jun 26, 2001
    Messages:
    23,270
    Likes Received:
    6
    Location:
    Shitcago
    didnt really work... but i think it's my fault now... :hs:
     

Share This Page