Hi Ken,

There are several methods to accomplish this task. you can use onclick or
use javascript with onclick.

*Example: 1*

<form>
<input name="Block Supervisors"  value=" "
onclick=window.open("testFileOne.php?id=<? echo $staff_id;
?>","Homepage","resizable=no,status=yes,scrollbars=yes,height=970,width=945,menubar=yes,addressbar=no")
type="button" />
</form>

*Example :2*

<script type="text/javascript" language="javascript" >
function popup() {

window.open("legend.php","Homepage","resizable=no,status=no,scrollbars=no,height=320,width=230,left=490,top=320,menubar=no,addressbar=no");
}

</script>

*1.* <a onclick="popup()" title="You will see a popup window">Click Me</a>

*2.*

<form>
<input name="Block Supervisors"  value=" " onclick="popup()"  type="button"
/>
</form>


You can always customize according to you need.

Hope i have helped you to solve the problem
Have a lovely day

Cheers
Mohamed Sathik.


On Thu, Dec 17, 2009 at 9:07 AM, kdubya <kenwin...@winanstech.com> wrote:

> I have an application where I want a "printer friendly" rendering. My
> print() action has it's own layout. The action is called from a form
> (method=POST). I need all the input from the form to generate the
> stuff to be printed. How do I get the resulting stuff to be rendered
> in a popup window instead of the existing window? Is it something I
> put in the layout? (I'm not really good with javascript stuff) Is
> there a way to specify this using redirect()? I have looked around
> quite a bit and I'm drawing a blank. (Note: I do know how to open a
> popup if I have a link like <a href="...>. I just can't figure out how
> to do it from an action that processes the data from a form)
>
> Thanks,
> Ken
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to