2011-02-24 22:08 阅读 107


I understand that javascript is client-side and PHP is server-side, within the code below, is there anyway for me to pop up a new window or make a call to pop open a new window? echo statements don't work. Any thoughts are greatly appreciated. Thanks!


class testpop__class 
    function testpop__method(&$bean, $event, $arguments=null) 
        if ($event != 'before_save') return; 
        // Insert your custom logic between these comments 

        // Insert your custom logic between these comments 
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    duanji1899 duanji1899 2011-02-24 22:10

    Using strictly PHP, no. However, if you use ECHO to output javascript, you can just have javascript open up a new window.

    点赞 评论 复制链接分享
  • doubi8965 doubi8965 2011-02-24 22:12

    You could use echo to print out some javascript. Like so

    echo "<script type='javascript'>window.showModalDialog('webpage.php')</script>";

    Hope this helps.

    点赞 评论 复制链接分享