Hello Manish,

you got the problem correctly but i think i missed one clause in the
statement. If the javascript is disabled then this custom window wont open
up and the whole layout would be displayed(with headers and footers of
course). In legacy how we used to achive this was to pull this form element
into that layout using template engine. but now, i wish that the same html
code should do taht job.. it means that the code
<a href="FormsController/index" onsubmit="openWindow"....>
should take user to whole layout if the javascript is disabled and should
open up only the form element in window if js is enabled.

I hope i waere clear
Thanks.


On 2/25/08, manish <[EMAIL PROTECTED]> wrote:
>
>
> Hi Novice,
>
> If I understand your requirement correctly, I think this is a very
> common requirement with baking.
>
> What you have to do is to define a new layout with no headers, footers
> or so(means no other content than what you want to be displayed on the
> new opened window and in the body of this template you have to write
> <?php echo $content_for_layout; ?>
> Now all you have to do is to call this layout for views that you want
> to open in a new window.
>
> Hope this helps.
>
> On Feb 25, 4:05 pm, "Novice Programmer" <[EMAIL PROTECTED]>
> wrote:
> > Hello guys,
> >
> > This might be a very specific/naive question. Please bear with me...
> > Actually what i am doing is poritng our existing application based on a
> > template engine to Cake. In our application We used to show a javascript
> > window in which a form is shown. This form is a separeate html window.
> We
> > observe the link click event and show the html of that form as innerhtml
> > into the js window. Let me take an example.
> >
> > <a href="myform.html" onclick="mywindow()".......> Open window </a>
> >
> > and we attach the observer the the link click. as the window opens we
> get
> > the href element of the click and take the innerhtml of that element and
> > show that inner html into the js window.
> >
> > Now as i baked the application. I pulled my form into an element and
> started
> > showing that element into my views. But as i changed teh code to
> following
> > cake savvy code, it renders whole the layout(which is cake's default
> > behavior),  instead of rendering only the form, but i want to pull only
> the
> > form in the window not the whole layout.
> >
> > <ahref ="FormsController/index" onclick = "mywindow()" ...> Open Window
> </a>
> >
> > I hope I were clear. Please help me port this.
> >
> > --
> > Thanks & Regards,
> > Novice (http://ishuonweb.wordpress.com/).
> >
>


-- 
Thanks & Regards,
Novice (http://ishuonweb.wordpress.com/).

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to