Hi !
I am using the same code, but i am not getting the out. please help me
out

On Apr 16, 3:57 pm, Ed Propsner <crotchf...@gmail.com> wrote:
> If it's your Javascript that's not working I would use:
>
> function validate()
>        {
>             var username=Form.Element.getValue('UserUsername');
>             window.alert("username");
>        }
>
> - Ed
>
> On Fri, Apr 16, 2010 at 6:46 AM, Ambika Kulkarni <ambikakulkarn...@gmail.com
>
>
>
> > wrote:
> > Hi All,
>
> > I want to send the post data to a javascript function. I have put the
> > code below . Please help name
>
> > view.ctp
> > If I am just calling the js function it works.
>
> > .....................
> > function  validate()    {
> >             window.alert("It's working");
> > }
>
> > <?php echo $form->create('User', array('action' =>'login'));
> >  echo $form->input(username);
> > echo $form-
>
> > >submit('signin.gif',array('width'=>100,'height'=>22,'onclick'=>'validate()'));
> >  echo $form->end();
> >  ?>
>
> > But when I am trying to do like the following it wont work
>
> >        function validate()
> >        {
> >             var username=document.User.username.value;
> >             window.alert("username");
> >        }
>
> > <?php echo $form->create('User', array('action' =>'login'));
> >  echo $form->input(username);
> > echo $form->submit('signin.gif',array('width'=>100,
> > 'height'=>22,'onclick'=>'validate()'));
> > echo $form->end(); ?>
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 sitehttp://cakeqs.organd 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 
> athttp://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