Opening Javascript PopUp from within PHP Code

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

    #1

    Opening Javascript PopUp from within PHP Code

    Hi folks,

    I've been trying to do this for days without success.

    Is there a way to open a popup window from within the php code?

    Example:

    if (some_condition ) {
    open a popup page and load a file in it
    break;
    }

    Thanks,

    Raffi
  • jmm-list-gn

    #2
    Re: Opening Javascript PopUp from within PHP Code

    Raffi wrote:[color=blue]
    >
    > Is there a way to open a popup window from within the php code?
    >[/color]
    <?php
    if (some_condition ) {
    echo '<script type="text/javascript">';
    echo "javascript_fun ction('$parm1', '$parm2');";
    echo '</script>' . "\n";
    }
    ?>


    --
    jmm dash list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Opening Javascript PopUp from within PHP Code

      Raffi wrote:
      [color=blue]
      > I've been trying to do this for days without success.
      >
      > Is there a way to open a popup window from within the php code?[/color]

      Not really. Server-side PHP scripts can only generate code that will later
      be executed by the client-side JS engine. However, you should forget about
      such unrequested popups since the new Windows XP Service Pack 2 makes IE to
      block them by default. Other UAs have provided other means to block them
      long since as they are mostly undesired.


      F'up2 php.general

      PointedEars

      Comment

      Working...