1

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.

<?php 

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 
    } 
} 
?>
1
  • Why should echo statements not work? Commented Feb 24, 2011 at 22:22

2 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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

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

Hope this helps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.