You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Stewart, Gary" <Ga...@luht.scot.nhs.uk> on 2006/03/10 17:31:31 UTC
Setting Default Focus in CForms
Hi there,
I've been trying to set the first form item to have focus when the form is loaded. Normally it would just be a case of setting
document.form.name.focus();
but the issue seems to be that CForms uses a name:input format for the id. Is there a way of setting the focus in CForms? I looked at the Widget API but couldn't see a function to set the widget as focus (unless I'm missing something... which is quite possible).
Thanks,
Gary
*****************************************************************
The information contained in this message may be confidential or
legally privileged and is intended for the addressee only, If you
have received this message in error or there are any problems,
please notify the originator immediately. The unauthorised use,
disclosure, copying or alteration of this message is
strictly forbidden.
*****************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Setting Default Focus in CForms
Posted by ia...@jpmchase.com.
Have you tried
document.form.elements['name:input'].focus?
Ian
It's better to be hated for who you are
than loved for who you are not
Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078
"Stewart, Gary"
<Gary.Stewart@luht.s To: <us...@cocoon.apache.org>
cot.nhs.uk> cc:
Subject: Setting Default Focus in CForms
03/10/2006 11:31 AM
Please respond to
users
Hi there,
I've been trying to set the first form item to have focus when the form is
loaded. Normally it would just be a case of setting
document.form.name.focus();
but the issue seems to be that CForms uses a name:input format for the id.
Is there a way of setting the focus in CForms? I looked at the Widget API
but couldn't see a function to set the widget as focus (unless I'm missing
something... which is quite possible).
Thanks,
Gary
*****************************************************************
The information contained in this message may be confidential or
legally privileged and is intended for the addressee only, If you
have received this message in error or there are any problems,
please notify the originator immediately. The unauthorised use,
disclosure, copying or alteration of this message is
strictly forbidden.
*****************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org