You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Anderson, Jessica" <Je...@trs.state.tx.us> on 2001/03/07 16:31:08 UTC
Anyway to onFocus without Javascript?
Does Struts provide any mechanism for focusing on a text field in the event
that the field did not pass validation - WITHOUT using Javascript? Not sure
if this is possible...thought i'd ask.
Thanks,
Jessica
Re: Anyway to onFocus without Javascript?
Posted by William Jaynes <wj...@mediaone.net>.
If the focus attribute is used in the html:form tag it actually generates JavaScript.
----- Original Message -----
From: "Eric Rasmussen" <er...@websidestory.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, March 07, 2001 10:05 PM
Subject: Re: Anyway to onFocus without Javascript?
> Well, there is, but I don't think this answers the original question.
>
> You can use the focus attribute of the html:form tag:
> <html:form action="[action]" focus="[name of field to focus on]">
>
> Alas, this will make it so that that field is always focussed on, not the
> field that gave the error. I am not sure if that is possible.
>
> - eric
>
> ----- Original Message -----
> From: "William Jaynes" <wj...@mediaone.net>
> To: <st...@jakarta.apache.org>
> Sent: Wednesday, March 07, 2001 2:02 PM
> Subject: Re: Anyway to onFocus without Javascript?
>
>
> > Sorry, Jessica,
> > There is no way to focus on to an html field without using JavaScript.
> >
> > ----- Original Message -----
> > From: "Anderson, Jessica" <Je...@trs.state.tx.us>
> > To: <st...@jakarta.apache.org>
> > Sent: Wednesday, March 07, 2001 10:31 AM
> > Subject: Anyway to onFocus without Javascript?
> >
> >
> > > Does Struts provide any mechanism for focusing on a text field in the
> event
> > > that the field did not pass validation - WITHOUT using Javascript? Not
> sure
> > > if this is possible...thought i'd ask.
> > > Thanks,
> > > Jessica
> >
> >
>
Re: Anyway to onFocus without Javascript?
Posted by Eric Rasmussen <er...@websidestory.com>.
Well, there is, but I don't think this answers the original question.
You can use the focus attribute of the html:form tag:
<html:form action="[action]" focus="[name of field to focus on]">
Alas, this will make it so that that field is always focussed on, not the
field that gave the error. I am not sure if that is possible.
- eric
----- Original Message -----
From: "William Jaynes" <wj...@mediaone.net>
To: <st...@jakarta.apache.org>
Sent: Wednesday, March 07, 2001 2:02 PM
Subject: Re: Anyway to onFocus without Javascript?
> Sorry, Jessica,
> There is no way to focus on to an html field without using JavaScript.
>
> ----- Original Message -----
> From: "Anderson, Jessica" <Je...@trs.state.tx.us>
> To: <st...@jakarta.apache.org>
> Sent: Wednesday, March 07, 2001 10:31 AM
> Subject: Anyway to onFocus without Javascript?
>
>
> > Does Struts provide any mechanism for focusing on a text field in the
event
> > that the field did not pass validation - WITHOUT using Javascript? Not
sure
> > if this is possible...thought i'd ask.
> > Thanks,
> > Jessica
>
>
Re: Anyway to onFocus without Javascript?
Posted by William Jaynes <wj...@mediaone.net>.
Sorry, Jessica,
There is no way to focus on to an html field without using JavaScript.
----- Original Message -----
From: "Anderson, Jessica" <Je...@trs.state.tx.us>
To: <st...@jakarta.apache.org>
Sent: Wednesday, March 07, 2001 10:31 AM
Subject: Anyway to onFocus without Javascript?
> Does Struts provide any mechanism for focusing on a text field in the event
> that the field did not pass validation - WITHOUT using Javascript? Not sure
> if this is possible...thought i'd ask.
> Thanks,
> Jessica