Hi all creating a link that when you click it, it opens a new window. I was wondering if it’s possible to restrict the size of the window opening?
this is the code I have for the link that opens the window
<?php echo $this->Html->link(
$this->Html->image($help, array(
"alt" => "eBox")),
'/accounts/help', array('target'=>'_blank', 'escape'=>false)); ?>
You can do this, but only with Javascript.
Raw code would be something like:
The only parameters you really need are width and height, but you might find the others useful too. If not, just delete them. If the user doesn’t have javascript, it’ll just open the link normally.
To do it with html helper, pass your javascript through to the onClick array key:
PS – you can read up on the window.open method here: http://www.w3schools.com/jsref/met_win_open.asp