CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Set focus to text field

Print topic Send  topic

Author Message
mammer
Posted: 06/12/2002, 7:41 AM

I can't figure this out. I am using this code in the Form Properties/Footer to set the focus to a text field called "FirstName" in a form called "Client". However I keep getting an error that says "Error: 'document.Client.FirstName' is null or not an object". I'm using ASP w/templates.

<script language="JavaScript">
document.Client.FirstName.focus();
</script>
Guest
Posted: 06/13/2002, 2:15 AM

Hello,
please check the form and field names are spelled correctly and have the same character case.
You can also try the code:
-
<script language="Javascript">
function login() {
document.forms[0].Login.focus();
}
document.body.onload=login;
</script>
-
<script language="Javascript">
document.forms[0].Login.focus();
</script>

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.