[ic] Form field auto focus

Ron Phipps ron at endpoint.com
Fri Jan 11 13:06:54 EST 2008


DB wrote:
>  >> I want to have the cursor automatically positioned into a certain form
>>> field when my page loads. I've found that this can be done using
>>>
>>> <body onLoad=”FormName.FieldName.focus();”>
>>>
>>> where FormName is the name of the form and FieldName is the name of 
>>> the desire field.
>>>
>>> I'm having trouble getting this to work in my IC page where my form's 
>>> name is [area search]. Does anyone have a suggestion?
>>>
>>> DB
>>
>> Hi DB,
>>
>> Is your form name [area search] or is that the target of the form?
>>
>> -- 
>> Ron Phipps
>> End Point Corporation
>> ron at endpoint.com
> 
> Hi - my page uses:
> 
> <form action="[area search]" method=post>
> ....
> 
> thanks for any hints....
> 
> DB

Try setting the name parameter:

<form action="[area search]" method=post name="search">
....
</form>

And then as Jordan suggested try:

<body onload="document.search.fieldname.focus();">

Replace fieldname with the name of the field you would like to set focus to.



-- 
Ron Phipps
End Point Corporation
ron at endpoint.com


More information about the interchange-users mailing list