The following works for me - assumes address is in the first form:

<script language="javascript">
<!--
document.forms[0].address.focus()
//-->
</script>

On Nov 30, 11:48 pm, pmate <[EMAIL PROTECTED]> wrote:
> hi,
> this is my code in the view:
>
> {{extend 'layout.html'}}
> <h1>Page Title </h1>
> {{=form}}
>
> <script language="javascript">
> <!--
> document.form.address.focus()
> //-->
> </script>
>
> so, i want that the focus goes to the field named "address" in my
> form. But it doesn't work.
> What am i missing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to