Re: Form Cancel

2007-03-15 Thread Langdon Stevenson

scragz wrote:
> You would still want controller code in place for non-JS clients where
> the onclick wouldn't fire.

Quite so.

The form that the code I posted comes from uses Ajax where available, 
but degrades to a regular post if JS is disabled.  Either way, it is 
still the same controller code that handles the submitted form.

Regards,
Langdon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Form Cancel

2007-03-15 Thread scragz

You would still want controller code in place for non-JS clients where
the onclick wouldn't fire.

On Mar 15, 4:35 pm, "francky06l" <[EMAIL PROTECTED]> wrote:
> you could even  use the aboce and add an "onClik" to redirect where
> you want without submitting at all the form.
>
> On Mar 15, 10:22 pm, Langdon Stevenson <[EMAIL PROTECTED]>
> wrote:
>
> > Hi Tuzi
>
> > I have cancel buttons in my application that work the way that you want.
> > The html for the button is as follows:
>
> >
> >
>
> > Then in my controller I test for the button using:
>
> >if($this->params['form']['submit'] == 'save') {
> >  do some stuff ...
> >}
>
> > Regards,
> > Langdon
>
> > Michael Tuzi wrote:
> > > Is it possible to create a cancel button in a form that doesn't
> > > require js using $html->submit? The submit button's value isn't
> > > returned in the params array.
>
> > --
> > --
> > Linden Row Pty Ltd
>
> > NSW  : +61 2 8215 0570
> > Victoria : +61 3 9013 9423
> > Fax  : +61 2 8215 0571
>
> > Mobile   : +61 416 118 037
>
> >http://www.lindenrow.com.au
>
> > ---
> > Buy fine chocolate onlinehttp://www.chocolatereview.com.au


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Form Cancel

2007-03-15 Thread francky06l

you could even  use the aboce and add an "onClik" to redirect where
you want without submitting at all the form.

On Mar 15, 10:22 pm, Langdon Stevenson <[EMAIL PROTECTED]>
wrote:
> Hi Tuzi
>
> I have cancel buttons in my application that work the way that you want.
> The html for the button is as follows:
>
>
>
>
> Then in my controller I test for the button using:
>
>if($this->params['form']['submit'] == 'save') {
>  do some stuff ...
>}
>
> Regards,
> Langdon
>
> Michael Tuzi wrote:
> > Is it possible to create a cancel button in a form that doesn't
> > require js using $html->submit? The submit button's value isn't
> > returned in the params array.
>
> --
> --
> Linden Row Pty Ltd
>
> NSW  : +61 2 8215 0570
> Victoria : +61 3 9013 9423
> Fax  : +61 2 8215 0571
>
> Mobile   : +61 416 118 037
>
> http://www.lindenrow.com.au
>
> ---
> Buy fine chocolate onlinehttp://www.chocolatereview.com.au


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Form Cancel

2007-03-15 Thread Langdon Stevenson

Hi Tuzi

I have cancel buttons in my application that work the way that you want. 
The html for the button is as follows:

   
   

Then in my controller I test for the button using:

   if($this->params['form']['submit'] == 'save') {
 do some stuff ...
   }

Regards,
Langdon


Michael Tuzi wrote:
> Is it possible to create a cancel button in a form that doesn't
> require js using $html->submit? The submit button's value isn't
> returned in the params array.
> 
> 
> > 

-- 
--
Linden Row Pty Ltd

NSW  : +61 2 8215 0570
Victoria : +61 3 9013 9423
Fax  : +61 2 8215 0571

Mobile   : +61 416 118 037

http://www.lindenrow.com.au

---
Buy fine chocolate online
http://www.chocolatereview.com.au

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Form Cancel

2007-03-15 Thread Michael Tuzi

Is it possible to create a cancel button in a form that doesn't
require js using $html->submit? The submit button's value isn't
returned in the params array.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---