hi all
var username=Form.Element.getValue('UserUsername');
i have a doubt
"UserUsername " - field name or form name or model name and is there any
specilalcharacte between User and Username.
i am using this both form name and inputfiled name
Form name : echo $form->create('User', array('action' =>'login'));
input filed : echo $form->input(username);
I am using
On Fri, Apr 16, 2010 at 4:27 PM, Ed Propsner <[email protected]> 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 <
> [email protected]> 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 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<cake-php%[email protected]>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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>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 [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