Reputation: 1359
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
}
}
?>
Upvotes: 1
Views: 2189
Reputation: 355
Using strictly PHP, no. However, if you use ECHO to output javascript, you can just have javascript open up a new window.
Upvotes: 3
Reputation: 25445
You could use echo to print out some javascript. Like so
echo "<script type='javascript'>window.showModalDialog('webpage.php')</script>";
Hope this helps.
Upvotes: 1