Just add an ID to the form input:

<?=$form->input('title', array('id' => 'title'))?>

Then in the JS you can do:

document.getElementById('title').focus();

On Jan 22, 5:52 am, Carl <[EMAIL PROTECTED]> wrote:
> I used to do this with something like this:
>
>                         <script 
> type='text/javascript'>document.post_form.title.focus();</
> script>
>
> but CakePHP forms use dot notation in the field names.
>
> I haven't found anything in the existing documentation.
--~--~---------~--~----~------------~-------~--~----~
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