Re: showing data in a popup in aftersave()
ok I see I need to explain what I aim on to get an answer fitting with
the question in mind
1st you are right at all. php wont open an popup, and the usual place
to do so might be the view.
What I want to do is
if a new dataset is stored to the model,
I call the aftersave() function
from there I want to show the data stored within the process
to do a printout fitting the page
if i do a printout within the cake site I will also have the menue be
printed
so I am looking for _any_ way to offer a PrintDataset function inside
my app.
later on I might lookup to use html2pdf lib to get it as pdf, too for
mailing it...
if I use JS to do a popup window, will I be able to access my app data
within the window via $this-> ... or use the variable I set inside the
controller some like this:: $this->set('mydatatobeused', ($this-
>Customer->Request));
and do the js popup to call me a php file to show up with echo my
$mydatatobeused informations?
thanks in advance
michael
On 15 Jun., 02:58, calvin <cal...@rottenrecords.com> wrote:
> You're getting server-side/client-side code confused. PHP code runs on
> the web server, not on the visitor's web browser. It can't create pop-
> up windows in the browser.
>
> If you want to use PHP to generate JavaScript in the _view_ to pop up
> a window, then you need to do that in the view, not in the model. The
> model is only for reading/writing/manipulating your data.
>
> On Jun 14, 12:03 pm, mivogt-LU <c...@mivogt.net> wrote:
>
> > HI @ all,
>
> > I would like to know if there is a way to settle some function inside
> > my aftersave() (inside the modelcode) to open an popupwindow showing
> > the modeldate in a printable format.
>
> > I am thinking on something like
> > function aftersave()
> > {
> > doPopupwindows($this->data)
>
> > }
>
> > and inside the popup
>
> > echo $this->data->model->field;
>
> > Any suggestions on this?
>
> > Thanks
>
> > Michael
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home