You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alex Colic <al...@pop-ware.com> on 2001/06/05 22:11:09 UTC

Setting focus to textbox?

Hi, I am getting an error setting focus to a textbox.

My form tag is as follows:

<html:form action="reqHeader" focus="requisitionHeader.reqTitle"
method="GET">

I have created a text box as follows:

<html:text property="requisitionHeader.reqTitle" size="16" maxlength="20" />

What I am trying to do is set focus to the text box when the page is loaded.

Any ideas where I have gone wrong?

Thanks for the help.

Alex

RE: Setting focus to textbox?

Posted by "Deadman, Hal" <ha...@tallan.com>.
Are you getting a JavaScript error? If so this may be fixed in a more recent
struts build. There used to be a problem setting the focus on fields that
used the nested property syntax.

> -----Original Message-----
> From: Alex Colic [mailto:alex.colic@pop-ware.com]
> Sent: Tuesday, June 05, 2001 4:11 PM
> To: Struts
> Subject: Setting focus to textbox?
>
>
>
> Hi, I am getting an error setting focus to a textbox.
>
> My form tag is as follows:
>
> <html:form action="reqHeader" focus="requisitionHeader.reqTitle"
> method="GET">
>
> I have created a text box as follows:
>
> <html:text property="requisitionHeader.reqTitle" size="16"
> maxlength="20" />
>
> What I am trying to do is set focus to the text box when the
> page is loaded.
>
> Any ideas where I have gone wrong?
>
> Thanks for the help.
>
> Alex
>