|
 |
asp_web_howto thread: RE: body onload focus()
Message #1 by "Drew, Ron" <RDrew@B...> on Tue, 25 Jun 2002 17:26:12 -0400
|
|
<body onLoad=3D"javascript:form.field.setFocus();">
<form name=3D"form" ...>
<input name=3D"field">
...
</form>
</body>
-----Original Message-----
From: Carlos Lamar [mailto:lamar@s...]
Sent: Tuesday, June 25, 2002 1:14 PM
To: ASP Web HowTo
Subject: [asp_web_howto] body onload focus()
Hello,
I am using the following code:
<body onload=3D"document.myform.first_name.focus();">
However, when the page loads, I'm getting the following error message:
Error: "document.myform.first_name" is not an object
I've already ensured that there are no spelling errors in the form or
field names. How can I correct this? Your help is greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
Message #2 by Shaun Steckley <SSTECKLEY@P...> on Tue, 25 Jun 2002 14:35:48 -0400
|
|
Try placing a semi-colon after your focus statement...
<body onload="document.MYFORM.first_name.focus();">
-----Original Message-----
From: Carlos Lamar [mailto:lamar@s...]
Sent: Tuesday, June 25, 2002 1:50 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: body onload focus()
I am using IE5. Should we upgrade?
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
> ----------
> From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> Reply To: ASP Web HowTo
> Sent: Tuesday, June 25, 2002 10:35 AM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: body onload focus()
>
> I copied and pasted your below code and tested with IE 6.x, Netscape
> 4.x and
> 6.x with no problems. What browser are you testing with for this
> error...
>
> -----Original Message-----
> From: Carlos Lamar [mailto:lamar@s...]
> Sent: Tuesday, June 25, 2002 1:33 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: body onload focus()
>
>
> Hi, Shaun,
>
> Thanks for responding... here is the my code:
> ------------------------------
> <%@ Language=VBScript %>
>
> <%
> Dim msg, xsize
> msg = Request.QueryString ("msg")
>
> 'prevent browsers from caching page
> Response.Expires = 0
>
> If Request("gb") = "1" Then
> rec_added = "Record added"
> Else
> rec_added = "New record"
> End If
> %>
>
>
> <html>
>
> <head>
> <meta http-equiv="Content-Language" content="en-us">
> <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
> <meta name="ProgId" content="FrontPage.Editor.Document">
> <meta http-equiv="Content-Type" content="text/html;
> charset=windows-1252">
> <title>New Page 1</title>
> <meta name="Microsoft Border" content="tb">
> </head>
>
> <body onload="document.MYFORM.first_name.focus()">
>
> <p> </p>
>
> <form name="MYFORM" method="POST" action="rec_add.asp">
> <center>
> <table border="0" cellpadding="2" bordercolor="#111111"
> width="479"
> height="82" bgcolor="#B4B4B4" style="border-collapse: collapse"
> cellspacing="0">
> <tr>
> <td width="794" height="76" align="center" colspan="2"
> valign="middle"><b>
> <font face="MS Sans Serif" size="4">MYFORM<br>
> Gift with Purchase Database</font></b></td>
> </tr>
> <tr>
> <td width="786" height="22" align="left" colspan="2">
> <font color="#0000FF" face="MS Sans Serif"><%= rec_added
> %></font></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1;
> border-top-style: solid; border-top-width: 1"><b><font face="MS Sans
> Serif">
> First Name:</font></b></td>
> <td width="387" height="22" style="border-left-style: solid;
> border-left-width: 1; border-top-style: solid; border-top-width: 1">
> <input type="text" name="first_name" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Last Name:</font></b></td>
> <td width="387" height="22" style="border-left-style: solid;
> border-left-width: 1">
> <input type="text" name="last_name" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Firm:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"><input type="text" name="firm" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Address:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"><input type="text" name="line1" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"> </td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"><input type="text" name="line2" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> City:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"><input type="text" name="city" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> State:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"><select size="1" name="D1">
> <OPTION selected value=>Select...</OPTION>
> <OPTION value=AL>Alabama</OPTION>
> <OPTION value=AK>Alaska</OPTION>
> <OPTION value=AZ>Arizona</OPTION>
> <OPTION value=AR>Arkansas</OPTION>
> <OPTION value=CA>California</OPTION>
> <OPTION value=CO>Colorado</OPTION>
> <OPTION value=CT>Connecticut</OPTION>
> <OPTION value=DE>Delaware</OPTION>
> <OPTION value=DC>District of Columbia</OPTION>
> <OPTION value=FL>Florida</OPTION>
> <OPTION value=GA>Georgia</OPTION>
> <OPTION value=HI>Hawaii</OPTION>
> <OPTION value=ID>Idaho</OPTION>
> <OPTION value=IL>Illinois</OPTION>
> <OPTION value=IN>Indiana</OPTION>
> <OPTION value=IA>Iowa</OPTION>
> <OPTION value=KS>Kansas</OPTION>
> <OPTION value=KY>Kentucky</OPTION>
> <OPTION value=LA>Lousiana</OPTION>
> <OPTION value=ME>Maine</OPTION>
> <OPTION value=MD>Maryland</OPTION>
> <OPTION value=MA>Massachussets</OPTION>
> <OPTION value=MI>Michigan</OPTION>
> <OPTION value=MN>Minnesota</OPTION>
> <OPTION value=MS>Mississippi</OPTION>
> <OPTION value=MO>Missouri</OPTION>
> <OPTION value=MT>Montana</OPTION>
> <OPTION value=NE>Nebraska</OPTION>
> <OPTION value=NV>Nevada</OPTION>
> <OPTION value=NH>New Hampshire</OPTION>
> <OPTION value=NJ>New Jersey</OPTION>
> <OPTION value=NM>New Mexico</OPTION>
> <OPTION value=NY>New York</OPTION>
> <OPTION value=NC>North Carolina</OPTION>
> <OPTION value=ND>North Dakota</OPTION>
> <OPTION value=OH>Ohio</OPTION>
> <OPTION value=OK>Oklahoma</OPTION>
> <OPTION value=OR>Oregon</OPTION>
> <OPTION value=PA>Pennsylvania</OPTION>
> <OPTION value=RI>Rhode Island</OPTION>
> <OPTION value=SC>South Carolina</OPTION>
> <OPTION value=SD>South Dakota</OPTION>
> <OPTION value=TX>Texas</OPTION>
> <OPTION value=TN>Tennesee</OPTION>
> <OPTION value=UT>Utah</OPTION>
> <OPTION value=VT>Vermont</OPTION>
> <OPTION value=VA>Virginia</OPTION>
> <OPTION value=WA>Washington</OPTION>
> <OPTION value=WV>West Virginia</OPTION>
> <OPTION value=WI>Wisconson</OPTION>
> <OPTION value=WY>Wyoming</OPTION>
> <OPTION value=>--------------------</OPTION>
> <OPTION value=AP>Armed Forces(APO)</OPTION>
> <OPTION value=FPO>Armed Forces(FPO)</OPTION>
> <OPTION value=>--------------------</OPTION>
> <OPTION value=AB>Alberta</OPTION>
> <OPTION value=BC>British Columbia</OPTION>
> <OPTION value=MB>Manitoba</OPTION>
> <OPTION value=NB>Brunswick</OPTION>
> <OPTION value=NF>Newfoundland</OPTION>
> <OPTION value=NT>Northwest Territory</OPTION>
> <OPTION value=NS>Nova Scotia</OPTION>
> <OPTION value=ON>Ontario</OPTION>
> <OPTION value=PE>Prince Edward Island</OPTION>
> <OPTION value=QB>Quebec</OPTION>
> <OPTION value=SK>Saskatchewan</OPTION>
> <OPTION value=YT>Yukon Territory</OPTION>
> <OPTION value=>--------------------</OPTION>
> </select></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Zip:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1">
> <input type="text" name="zip" size="11"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"> </td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"> </td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Item Ordered:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"><select size="1" name="item">
> <option value="56798" selected>Convertible Tote Bag</option>
> </select></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Qty Ordered:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1">
> <!--webbot bot="Validation" s-data-type="Integer"
> s-number-separators="," --><input type="text" name="qty" size="6"
> value="1"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"> </td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1"> </td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Check #:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1">
> <input type="text" name="check_num" size="20"></td>
> </tr>
> <tr>
> <td width="399" height="22" align="right"
> style="border-right-style: solid; border-right-width: 1"><b><font
> face="MS Sans Serif">
> Check Amount:</font></b></td>
> <td width="379" height="22" style="border-left-style: solid;
> border-left-width: 1">
> $
> <input type="text" name="check_amt" size="11"
> value="0.00"></td>
> </tr>
> </table>
> </center>
> </div>
> <p align="center"><input type="submit" value="Add to Database"
> name="B1"> <input type="reset" value="Reset"
> name="B2"></p>
> <p align="center"> </p>
> </form>
> <script>
> document.all.MYFORM.first_name.focus();
> </script>
>
> </body>
>
> </html>
>
> ------------------------------
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *: xxx.xxx.xxxx
> > *: xxx.xxx.xxxx (FAX)
> > *: clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
> > ----------
> > From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> > Reply To: ASP Web HowTo
> > Sent: Tuesday, June 25, 2002 10:17 AM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] RE: body onload focus()
> >
> > It would be helpful to see your HTML...
> >
> > -----Original Message-----
> > From: Carlos Lamar [mailto:lamar@s...]
> > Sent: Tuesday, June 25, 2002 1:14 PM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] body onload focus()
> >
> >
> > Hello,
> >
> > I am using the following code:
> >
> > <body onload="document.myform.first_name.focus();">
> >
> > However, when the page loads, I'm getting the following error
> message:
> >
> > Error: "document.myform.first_name" is not an object
> >
> > I've already ensured that there are no spelling errors in the form
> or
> > field names. How can I correct this? Your help is greatly
> > appreciated.
> >
> > Thanks!
> > ---Carlos
> >
> > ____________________________________________________
> > Carlos L. LaMar
> > Executive VP, IS & Management Development
> > snyder/newell, inc.
> > > *: xxx.xxx.xxxx
> > > *: xxx.xxx.xxxx (FAX)
> > > *: clamar@s...
> > > u http://www.snyder-newell.com/
> > >
> > >
> > >
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> >
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> > me
> > r-20
> > Constructing Accessible Web Sites
> >
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> > me
> > r-20
> > Practical JavaScript for the Usable Web
> >
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> > me
> > r-20
> >
> >
> > The information contained in this email is confidential and is
> > intended solely for the use of the person identified and intended as
> > the recipient. If you are not the intended recipient, any
> disclosure,
> > copying, distribution, or taking of any action in reliance on the
> > contents is prohibited. If you receive this message in error,
> contact
> > the sender immediately and delete it from your computer.
> >
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> >
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> > me
> > r-20
> > Constructing Accessible Web Sites
> >
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> > me
> > r-20
> > Practical JavaScript for the Usable Web
> >
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> > me
> > r-20
> >
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> me
> r-20
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> me
> r-20
>
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by Paul R Stearns <pauls@c...> on Tue, 25 Jun 2002 14:13:57 -0400
|
|
Carlos:
Probably not... I did notice that in the original post you had;
<body onload="document.myform.first_name.focus();">
In the page you included you had;
<body onload="document.MYFORM.first_name.focus()">
If the second post is not what you are actually using (I tend to modify code
before posting) you may have introduced a correction. Be very careful not only
about spelling but also case. JavaScript is very persnickity regarding
cApItAlIzAtIoN.
Paul
Carlos Lamar wrote:
> I am using IE5. Should we upgrade?
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *: xxx.xxx.xxxx
> > *: xxx.xxx.xxxx (FAX)
> > *: clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
> > ----------
> > From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> > Reply To: ASP Web HowTo
> > Sent: Tuesday, June 25, 2002 10:35 AM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] RE: body onload focus()
> >
> > I copied and pasted your below code and tested with IE 6.x, Netscape
> > 4.x and
> > 6.x with no problems. What browser are you testing with for this
> > error...
> >
> > -----Original Message-----
> > From: Carlos Lamar [mailto:lamar@s...]
> > Sent: Tuesday, June 25, 2002 1:33 PM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] RE: body onload focus()
> >
> >
> > Hi, Shaun,
> >
> > Thanks for responding... here is the my code:
> > ------------------------------
> > <%@ Language=VBScript %>
> >
> > <%
> > Dim msg, xsize
> > msg = Request.QueryString ("msg")
> >
> > 'prevent browsers from caching page
> > Response.Expires = 0
> >
> > If Request("gb") = "1" Then
> > rec_added = "Record added"
> > Else
> > rec_added = "New record"
> > End If
> > %>
> >
> >
> > <html>
> >
> > <head>
> > <meta http-equiv="Content-Language" content="en-us">
> > <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
> > <meta name="ProgId" content="FrontPage.Editor.Document">
> > <meta http-equiv="Content-Type" content="text/html;
> > charset=windows-1252">
> > <title>New Page 1</title>
> > <meta name="Microsoft Border" content="tb">
> > </head>
> >
> > <body onload="document.MYFORM.first_name.focus()">
> >
> > <p> </p>
> >
> > <form name="MYFORM" method="POST" action="rec_add.asp">
> > <center>
> > <table border="0" cellpadding="2" bordercolor="#111111"
> > width="479"
> > height="82" bgcolor="#B4B4B4" style="border-collapse: collapse"
> > cellspacing="0">
> > <tr>
> > <td width="794" height="76" align="center" colspan="2"
> > valign="middle"><b>
> > <font face="MS Sans Serif" size="4">MYFORM<br>
> > Gift with Purchase Database</font></b></td>
> > </tr>
> > <tr>
> > <td width="786" height="22" align="left" colspan="2">
> > <font color="#0000FF" face="MS Sans Serif"><%= rec_added
> > %></font></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1;
> > border-top-style: solid; border-top-width: 1"><b><font face="MS Sans
> > Serif">
> > First Name:</font></b></td>
> > <td width="387" height="22" style="border-left-style: solid;
> > border-left-width: 1; border-top-style: solid; border-top-width: 1">
> > <input type="text" name="first_name" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Last Name:</font></b></td>
> > <td width="387" height="22" style="border-left-style: solid;
> > border-left-width: 1">
> > <input type="text" name="last_name" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Firm:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"><input type="text" name="firm" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Address:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"><input type="text" name="line1" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"> </td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"><input type="text" name="line2" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > City:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"><input type="text" name="city" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > State:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"><select size="1" name="D1">
> > <OPTION selected value=>Select...</OPTION>
> > <OPTION value=AL>Alabama</OPTION>
> > <OPTION value=AK>Alaska</OPTION>
> > <OPTION value=AZ>Arizona</OPTION>
> > <OPTION value=AR>Arkansas</OPTION>
> > <OPTION value=CA>California</OPTION>
> > <OPTION value=CO>Colorado</OPTION>
> > <OPTION value=CT>Connecticut</OPTION>
> > <OPTION value=DE>Delaware</OPTION>
> > <OPTION value=DC>District of Columbia</OPTION>
> > <OPTION value=FL>Florida</OPTION>
> > <OPTION value=GA>Georgia</OPTION>
> > <OPTION value=HI>Hawaii</OPTION>
> > <OPTION value=ID>Idaho</OPTION>
> > <OPTION value=IL>Illinois</OPTION>
> > <OPTION value=IN>Indiana</OPTION>
> > <OPTION value=IA>Iowa</OPTION>
> > <OPTION value=KS>Kansas</OPTION>
> > <OPTION value=KY>Kentucky</OPTION>
> > <OPTION value=LA>Lousiana</OPTION>
> > <OPTION value=ME>Maine</OPTION>
> > <OPTION value=MD>Maryland</OPTION>
> > <OPTION value=MA>Massachussets</OPTION>
> > <OPTION value=MI>Michigan</OPTION>
> > <OPTION value=MN>Minnesota</OPTION>
> > <OPTION value=MS>Mississippi</OPTION>
> > <OPTION value=MO>Missouri</OPTION>
> > <OPTION value=MT>Montana</OPTION>
> > <OPTION value=NE>Nebraska</OPTION>
> > <OPTION value=NV>Nevada</OPTION>
> > <OPTION value=NH>New Hampshire</OPTION>
> > <OPTION value=NJ>New Jersey</OPTION>
> > <OPTION value=NM>New Mexico</OPTION>
> > <OPTION value=NY>New York</OPTION>
> > <OPTION value=NC>North Carolina</OPTION>
> > <OPTION value=ND>North Dakota</OPTION>
> > <OPTION value=OH>Ohio</OPTION>
> > <OPTION value=OK>Oklahoma</OPTION>
> > <OPTION value=OR>Oregon</OPTION>
> > <OPTION value=PA>Pennsylvania</OPTION>
> > <OPTION value=RI>Rhode Island</OPTION>
> > <OPTION value=SC>South Carolina</OPTION>
> > <OPTION value=SD>South Dakota</OPTION>
> > <OPTION value=TX>Texas</OPTION>
> > <OPTION value=TN>Tennesee</OPTION>
> > <OPTION value=UT>Utah</OPTION>
> > <OPTION value=VT>Vermont</OPTION>
> > <OPTION value=VA>Virginia</OPTION>
> > <OPTION value=WA>Washington</OPTION>
> > <OPTION value=WV>West Virginia</OPTION>
> > <OPTION value=WI>Wisconson</OPTION>
> > <OPTION value=WY>Wyoming</OPTION>
> > <OPTION value=>--------------------</OPTION>
> > <OPTION value=AP>Armed Forces(APO)</OPTION>
> > <OPTION value=FPO>Armed Forces(FPO)</OPTION>
> > <OPTION value=>--------------------</OPTION>
> > <OPTION value=AB>Alberta</OPTION>
> > <OPTION value=BC>British Columbia</OPTION>
> > <OPTION value=MB>Manitoba</OPTION>
> > <OPTION value=NB>Brunswick</OPTION>
> > <OPTION value=NF>Newfoundland</OPTION>
> > <OPTION value=NT>Northwest Territory</OPTION>
> > <OPTION value=NS>Nova Scotia</OPTION>
> > <OPTION value=ON>Ontario</OPTION>
> > <OPTION value=PE>Prince Edward Island</OPTION>
> > <OPTION value=QB>Quebec</OPTION>
> > <OPTION value=SK>Saskatchewan</OPTION>
> > <OPTION value=YT>Yukon Territory</OPTION>
> > <OPTION value=>--------------------</OPTION>
> > </select></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Zip:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1">
> > <input type="text" name="zip" size="11"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"> </td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"> </td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Item Ordered:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"><select size="1" name="item">
> > <option value="56798" selected>Convertible Tote Bag</option>
> > </select></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Qty Ordered:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1">
> > <!--webbot bot="Validation" s-data-type="Integer"
> > s-number-separators="," --><input type="text" name="qty" size="6"
> > value="1"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"> </td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1"> </td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Check #:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1">
> > <input type="text" name="check_num" size="20"></td>
> > </tr>
> > <tr>
> > <td width="399" height="22" align="right"
> > style="border-right-style: solid; border-right-width: 1"><b><font
> > face="MS Sans Serif">
> > Check Amount:</font></b></td>
> > <td width="379" height="22" style="border-left-style: solid;
> > border-left-width: 1">
> > $
> > <input type="text" name="check_amt" size="11"
> > value="0.00"></td>
> > </tr>
> > </table>
> > </center>
> > </div>
> > <p align="center"><input type="submit" value="Add to Database"
> > name="B1"> <input type="reset" value="Reset"
> > name="B2"></p>
> > <p align="center"> </p>
> > </form>
> > <script>
> > document.all.MYFORM.first_name.focus();
> > </script>
> >
> > </body>
> >
> > </html>
> >
> > ------------------------------
> >
> > ____________________________________________________
> > Carlos L. LaMar
> > Executive VP, IS & Management Development
> > snyder/newell, inc.
> > > *: xxx.xxx.xxxx
> > > *: xxx.xxx.xxxx (FAX)
> > > *: clamar@s...
> > > u http://www.snyder-newell.com/
> > >
> > >
> > >
> > > ----------
> > > From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> > > Reply To: ASP Web HowTo
> > > Sent: Tuesday, June 25, 2002 10:17 AM
> > > To: ASP Web HowTo
> > > Subject: [asp_web_howto] RE: body onload focus()
> > >
> > > It would be helpful to see your HTML...
> > >
> > > -----Original Message-----
> > > From: Carlos Lamar [mailto:lamar@s...]
> > > Sent: Tuesday, June 25, 2002 1:14 PM
> > > To: ASP Web HowTo
> > > Subject: [asp_web_howto] body onload focus()
> > >
> > >
> > > Hello,
> > >
> > > I am using the following code:
> > >
> > > <body onload="document.myform.first_name.focus();">
> > >
> > > However, when the page loads, I'm getting the following error
> > message:
> > >
> > > Error: "document.myform.first_name" is not an object
> > >
> > > I've already ensured that there are no spelling errors in the form
> > or
> > > field names. How can I correct this? Your help is greatly
> > > appreciated.
> > >
> > > Thanks!
> > > ---Carlos
> > >
> > > ____________________________________________________
> > > Carlos L. LaMar
> > > Executive VP, IS & Management Development
> > > snyder/newell, inc.
> > > > *: xxx.xxx.xxxx
> > > > *: xxx.xxx.xxxx (FAX)
> > > > *: clamar@s...
> > > > u http://www.snyder-newell.com/
> > > >
> > > >
> > > >
> > >
> > >
> > > ---
> > >
> > > Improve your web design skills with these new books from Glasshaus.
> > >
> > > Usable Web Menus
> > >
> > http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> > > me
> > > r-20
> > > Constructing Accessible Web Sites
> > >
> > http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> > > me
> > > r-20
> > > Practical JavaScript for the Usable Web
> > >
> > http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> > > me
> > > r-20
> > >
> > >
> > > The information contained in this email is confidential and is
> > > intended solely for the use of the person identified and intended as
> > > the recipient. If you are not the intended recipient, any
> > disclosure,
> > > copying, distribution, or taking of any action in reliance on the
> > > contents is prohibited. If you receive this message in error,
> > contact
> > > the sender immediately and delete it from your computer.
> > >
> > >
> > >
> > > ---
> > >
> > > Improve your web design skills with these new books from Glasshaus.
> > >
> > > Usable Web Menus
> > >
> > http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> > > me
> > > r-20
> > > Constructing Accessible Web Sites
> > >
> > http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> > > me
> > > r-20
> > > Practical JavaScript for the Usable Web
> > >
> > http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> > > me
> > > r-20
> > >
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> > http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> > me
> > r-20
> > Constructing Accessible Web Sites
> > http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> > me
> > r-20
> > Practical JavaScript for the Usable Web
> > http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> > me
> > r-20
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> > http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> > me
> > r-20
> > Constructing Accessible Web Sites
> > http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> > me
> > r-20
> > Practical JavaScript for the Usable Web
> > http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> > me
> > r-20
> >
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
Message #4 by Shaun Steckley <SSTECKLEY@P...> on Tue, 25 Jun 2002 13:35:37 -0400
|
|
I copied and pasted your below code and tested with IE 6.x, Netscape 4.x and
6.x with no problems. What browser are you testing with for this error...
-----Original Message-----
From: Carlos Lamar [mailto:lamar@s...]
Sent: Tuesday, June 25, 2002 1:33 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: body onload focus()
Hi, Shaun,
Thanks for responding... here is the my code:
------------------------------
<%@ Language=VBScript %>
<%
Dim msg, xsize
msg = Request.QueryString ("msg")
'prevent browsers from caching page
Response.Expires = 0
If Request("gb") = "1" Then
rec_added = "Record added"
Else
rec_added = "New record"
End If
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
<meta name="Microsoft Border" content="tb">
</head>
<body onload="document.MYFORM.first_name.focus()">
<p> </p>
<form name="MYFORM" method="POST" action="rec_add.asp">
<center>
<table border="0" cellpadding="2" bordercolor="#111111" width="479"
height="82" bgcolor="#B4B4B4" style="border-collapse: collapse"
cellspacing="0">
<tr>
<td width="794" height="76" align="center" colspan="2"
valign="middle"><b>
<font face="MS Sans Serif" size="4">MYFORM<br>
Gift with Purchase Database</font></b></td>
</tr>
<tr>
<td width="786" height="22" align="left" colspan="2">
<font color="#0000FF" face="MS Sans Serif"><%= rec_added
%></font></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1;
border-top-style: solid; border-top-width: 1"><b><font face="MS Sans
Serif">
First Name:</font></b></td>
<td width="387" height="22" style="border-left-style: solid;
border-left-width: 1; border-top-style: solid; border-top-width: 1">
<input type="text" name="first_name" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Last Name:</font></b></td>
<td width="387" height="22" style="border-left-style: solid;
border-left-width: 1">
<input type="text" name="last_name" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Firm:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"><input type="text" name="firm" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Address:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"><input type="text" name="line1" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"> </td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"><input type="text" name="line2" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
City:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"><input type="text" name="city" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
State:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"><select size="1" name="D1">
<OPTION selected value=>Select...</OPTION>
<OPTION value=AL>Alabama</OPTION>
<OPTION value=AK>Alaska</OPTION>
<OPTION value=AZ>Arizona</OPTION>
<OPTION value=AR>Arkansas</OPTION>
<OPTION value=CA>California</OPTION>
<OPTION value=CO>Colorado</OPTION>
<OPTION value=CT>Connecticut</OPTION>
<OPTION value=DE>Delaware</OPTION>
<OPTION value=DC>District of Columbia</OPTION>
<OPTION value=FL>Florida</OPTION>
<OPTION value=GA>Georgia</OPTION>
<OPTION value=HI>Hawaii</OPTION>
<OPTION value=ID>Idaho</OPTION>
<OPTION value=IL>Illinois</OPTION>
<OPTION value=IN>Indiana</OPTION>
<OPTION value=IA>Iowa</OPTION>
<OPTION value=KS>Kansas</OPTION>
<OPTION value=KY>Kentucky</OPTION>
<OPTION value=LA>Lousiana</OPTION>
<OPTION value=ME>Maine</OPTION>
<OPTION value=MD>Maryland</OPTION>
<OPTION value=MA>Massachussets</OPTION>
<OPTION value=MI>Michigan</OPTION>
<OPTION value=MN>Minnesota</OPTION>
<OPTION value=MS>Mississippi</OPTION>
<OPTION value=MO>Missouri</OPTION>
<OPTION value=MT>Montana</OPTION>
<OPTION value=NE>Nebraska</OPTION>
<OPTION value=NV>Nevada</OPTION>
<OPTION value=NH>New Hampshire</OPTION>
<OPTION value=NJ>New Jersey</OPTION>
<OPTION value=NM>New Mexico</OPTION>
<OPTION value=NY>New York</OPTION>
<OPTION value=NC>North Carolina</OPTION>
<OPTION value=ND>North Dakota</OPTION>
<OPTION value=OH>Ohio</OPTION>
<OPTION value=OK>Oklahoma</OPTION>
<OPTION value=OR>Oregon</OPTION>
<OPTION value=PA>Pennsylvania</OPTION>
<OPTION value=RI>Rhode Island</OPTION>
<OPTION value=SC>South Carolina</OPTION>
<OPTION value=SD>South Dakota</OPTION>
<OPTION value=TX>Texas</OPTION>
<OPTION value=TN>Tennesee</OPTION>
<OPTION value=UT>Utah</OPTION>
<OPTION value=VT>Vermont</OPTION>
<OPTION value=VA>Virginia</OPTION>
<OPTION value=WA>Washington</OPTION>
<OPTION value=WV>West Virginia</OPTION>
<OPTION value=WI>Wisconson</OPTION>
<OPTION value=WY>Wyoming</OPTION>
<OPTION value=>--------------------</OPTION>
<OPTION value=AP>Armed Forces(APO)</OPTION>
<OPTION value=FPO>Armed Forces(FPO)</OPTION>
<OPTION value=>--------------------</OPTION>
<OPTION value=AB>Alberta</OPTION>
<OPTION value=BC>British Columbia</OPTION>
<OPTION value=MB>Manitoba</OPTION>
<OPTION value=NB>Brunswick</OPTION>
<OPTION value=NF>Newfoundland</OPTION>
<OPTION value=NT>Northwest Territory</OPTION>
<OPTION value=NS>Nova Scotia</OPTION>
<OPTION value=ON>Ontario</OPTION>
<OPTION value=PE>Prince Edward Island</OPTION>
<OPTION value=QB>Quebec</OPTION>
<OPTION value=SK>Saskatchewan</OPTION>
<OPTION value=YT>Yukon Territory</OPTION>
<OPTION value=>--------------------</OPTION>
</select></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Zip:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1">
<input type="text" name="zip" size="11"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"> </td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"> </td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Item Ordered:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"><select size="1" name="item">
<option value="56798" selected>Convertible Tote Bag</option>
</select></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Qty Ordered:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1">
<!--webbot bot="Validation" s-data-type="Integer"
s-number-separators="," --><input type="text" name="qty" size="6"
value="1"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"> </td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1"> </td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Check #:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1">
<input type="text" name="check_num" size="20"></td>
</tr>
<tr>
<td width="399" height="22" align="right"
style="border-right-style: solid; border-right-width: 1"><b><font
face="MS Sans Serif">
Check Amount:</font></b></td>
<td width="379" height="22" style="border-left-style: solid;
border-left-width: 1">
$
<input type="text" name="check_amt" size="11" value="0.00"></td>
</tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value="Add to Database"
name="B1"> <input type="reset" value="Reset"
name="B2"></p>
<p align="center"> </p>
</form>
<script>
document.all.MYFORM.first_name.focus();
</script>
</body>
</html>
------------------------------
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
> ----------
> From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> Reply To: ASP Web HowTo
> Sent: Tuesday, June 25, 2002 10:17 AM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: body onload focus()
>
> It would be helpful to see your HTML...
>
> -----Original Message-----
> From: Carlos Lamar [mailto:lamar@s...]
> Sent: Tuesday, June 25, 2002 1:14 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] body onload focus()
>
>
> Hello,
>
> I am using the following code:
>
> <body onload="document.myform.first_name.focus();">
>
> However, when the page loads, I'm getting the following error message:
>
> Error: "document.myform.first_name" is not an object
>
> I've already ensured that there are no spelling errors in the form or
> field names. How can I correct this? Your help is greatly
> appreciated.
>
> Thanks!
> ---Carlos
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *: xxx.xxx.xxxx
> > *: xxx.xxx.xxxx (FAX)
> > *: clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> me
> r-20
>
>
> The information contained in this email is confidential and is
> intended solely for the use of the person identified and intended as
> the recipient. If you are not the intended recipient, any disclosure,
> copying, distribution, or taking of any action in reliance on the
> contents is prohibited. If you receive this message in error, contact
> the sender immediately and delete it from your computer.
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogram
> me
> r-20
>
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #5 by "Carlos Lamar" <lamar@s...> on Tue, 25 Jun 2002 10:49:30 -0700
|
|
I am using IE5. Should we upgrade?
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
> ----------
> From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> Reply To: ASP Web HowTo
> Sent: Tuesday, June 25, 2002 10:35 AM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: body onload focus()
>
> I copied and pasted your below code and tested with IE 6.x, Netscape
> 4.x and
> 6.x with no problems. What browser are you testing with for this
> error...
>
> -----Original Message-----
> From: Carlos Lamar [mailto:lamar@s...]
> Sent: Tuesday, June 25, 2002 1:33 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: body onload focus()
>
>
> Hi, Shaun,
>
> Thanks for responding... here is the my code:
> ------------------------------
> <%@ Language=3DVBScript %>
>
> <%
> Dim msg, xsize
> msg =3D Request.QueryString ("msg")
>
> 'prevent browsers from caching page
> Response.Expires =3D 0
>
> If Request("gb") =3D "1" Then
> rec_added =3D "Record added"
> Else
> rec_added =3D "New record"
> End If
> %>
>
>
> <html>
>
> <head>
> <meta http-equiv=3D"Content-Language" content=3D"en-us">
> <meta name=3D"GENERATOR" content=3D"Microsoft FrontPage 5.0">
> <meta name=3D"ProgId" content=3D"FrontPage.Editor.Document">
> <meta http-equiv=3D"Content-Type" content=3D"text/html;
> charset=3Dwindows-1252">
> <title>New Page 1</title>
> <meta name=3D"Microsoft Border" content=3D"tb">
> </head>
>
> <body onload=3D"document.MYFORM.first_name.focus()">
>
> <p> </p>
>
> <form name=3D"MYFORM" method=3D"POST" action=3D"rec_add.asp">
> <center>
> <table border=3D"0" cellpadding=3D"2" bordercolor=3D"#111111"
> width=3D"479"
> height=3D"82" bgcolor=3D"#B4B4B4" style=3D"border-collapse: collapse"
> cellspacing=3D"0">
> <tr>
> <td width=3D"794" height=3D"76" align=3D"center" colspan=3D"2"
> valign=3D"middle"><b>
> <font face=3D"MS Sans Serif" size=3D"4">MYFORM<br>
> Gift with Purchase Database</font></b></td>
> </tr>
> <tr>
> <td width=3D"786" height=3D"22" align=3D"left" colspan=3D"2">
> <font color=3D"#0000FF" face=3D"MS Sans Serif"><%=3D rec_added
> %></font></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1;
> border-top-style: solid; border-top-width: 1"><b><font face=3D"MS Sans
> Serif">
> First Name:</font></b></td>
> <td width=3D"387" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1; border-top-style: solid; border-top-width: 1">
> <input type=3D"text" name=3D"first_name" size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Last Name:</font></b></td>
> <td width=3D"387" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1">
> <input type=3D"text" name=3D"last_name" size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Firm:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"><input type=3D"text" name=3D"firm"
size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Address:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"><input type=3D"text" name=3D"line1"
size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"> </td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"><input type=3D"text" name=3D"line2"
size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> City:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"><input type=3D"text" name=3D"city"
size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> State:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"><select size=3D"1" name=3D"D1">
> <OPTION selected value=3D>Select...</OPTION>
> <OPTION value=3DAL>Alabama</OPTION>
> <OPTION value=3DAK>Alaska</OPTION>
> <OPTION value=3DAZ>Arizona</OPTION>
> <OPTION value=3DAR>Arkansas</OPTION>
> <OPTION value=3DCA>California</OPTION>
> <OPTION value=3DCO>Colorado</OPTION>
> <OPTION value=3DCT>Connecticut</OPTION>
> <OPTION value=3DDE>Delaware</OPTION>
> <OPTION value=3DDC>District of Columbia</OPTION>
> <OPTION value=3DFL>Florida</OPTION>
> <OPTION value=3DGA>Georgia</OPTION>
> <OPTION value=3DHI>Hawaii</OPTION>
> <OPTION value=3DID>Idaho</OPTION>
> <OPTION value=3DIL>Illinois</OPTION>
> <OPTION value=3DIN>Indiana</OPTION>
> <OPTION value=3DIA>Iowa</OPTION>
> <OPTION value=3DKS>Kansas</OPTION>
> <OPTION value=3DKY>Kentucky</OPTION>
> <OPTION value=3DLA>Lousiana</OPTION>
> <OPTION value=3DME>Maine</OPTION>
> <OPTION value=3DMD>Maryland</OPTION>
> <OPTION value=3DMA>Massachussets</OPTION>
> <OPTION value=3DMI>Michigan</OPTION>
> <OPTION value=3DMN>Minnesota</OPTION>
> <OPTION value=3DMS>Mississippi</OPTION>
> <OPTION value=3DMO>Missouri</OPTION>
> <OPTION value=3DMT>Montana</OPTION>
> <OPTION value=3DNE>Nebraska</OPTION>
> <OPTION value=3DNV>Nevada</OPTION>
> <OPTION value=3DNH>New Hampshire</OPTION>
> <OPTION value=3DNJ>New Jersey</OPTION>
> <OPTION value=3DNM>New Mexico</OPTION>
> <OPTION value=3DNY>New York</OPTION>
> <OPTION value=3DNC>North Carolina</OPTION>
> <OPTION value=3DND>North Dakota</OPTION>
> <OPTION value=3DOH>Ohio</OPTION>
> <OPTION value=3DOK>Oklahoma</OPTION>
> <OPTION value=3DOR>Oregon</OPTION>
> <OPTION value=3DPA>Pennsylvania</OPTION>
> <OPTION value=3DRI>Rhode Island</OPTION>
> <OPTION value=3DSC>South Carolina</OPTION>
> <OPTION value=3DSD>South Dakota</OPTION>
> <OPTION value=3DTX>Texas</OPTION>
> <OPTION value=3DTN>Tennesee</OPTION>
> <OPTION value=3DUT>Utah</OPTION>
> <OPTION value=3DVT>Vermont</OPTION>
> <OPTION value=3DVA>Virginia</OPTION>
> <OPTION value=3DWA>Washington</OPTION>
> <OPTION value=3DWV>West Virginia</OPTION>
> <OPTION value=3DWI>Wisconson</OPTION>
> <OPTION value=3DWY>Wyoming</OPTION>
> <OPTION value=3D>--------------------</OPTION>
> <OPTION value=3DAP>Armed Forces(APO)</OPTION>
> <OPTION value=3DFPO>Armed Forces(FPO)</OPTION>
> <OPTION value=3D>--------------------</OPTION>
> <OPTION value=3DAB>Alberta</OPTION>
> <OPTION value=3DBC>British Columbia</OPTION>
> <OPTION value=3DMB>Manitoba</OPTION>
> <OPTION value=3DNB>Brunswick</OPTION>
> <OPTION value=3DNF>Newfoundland</OPTION>
> <OPTION value=3DNT>Northwest Territory</OPTION>
> <OPTION value=3DNS>Nova Scotia</OPTION>
> <OPTION value=3DON>Ontario</OPTION>
> <OPTION value=3DPE>Prince Edward Island</OPTION>
> <OPTION value=3DQB>Quebec</OPTION>
> <OPTION value=3DSK>Saskatchewan</OPTION>
> <OPTION value=3DYT>Yukon Territory</OPTION>
> <OPTION value=3D>--------------------</OPTION>
> </select></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Zip:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1">
> <input type=3D"text" name=3D"zip" size=3D"11"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"> </td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"> </td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Item Ordered:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"><select size=3D"1" name=3D"item">
> <option value=3D"56798" selected>Convertible Tote Bag</option>
> </select></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Qty Ordered:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1">
> <!--webbot bot=3D"Validation" s-data-type=3D"Integer"
> s-number-separators=3D"," --><input type=3D"text" name=3D"qty"
size=3D"6"
> value=3D"1"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"> </td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1"> </td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Check #:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1">
> <input type=3D"text" name=3D"check_num" size=3D"20"></td>
> </tr>
> <tr>
> <td width=3D"399" height=3D"22" align=3D"right"
> style=3D"border-right-style: solid; border-right-width: 1"><b><font
> face=3D"MS Sans Serif">
> Check Amount:</font></b></td>
> <td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
> border-left-width: 1">
> $
> <input type=3D"text" name=3D"check_amt" size=3D"11"
> value=3D"0.00"></td>
> </tr>
> </table>
> </center>
> </div>
> <p align=3D"center"><input type=3D"submit" value=3D"Add to Database"
> name=3D"B1"> <input type=3D"reset" value=3D"Reset"
> name=3D"B2"></p>
> <p align=3D"center"> </p>
> </form>
> <script>
> document.all.MYFORM.first_name.focus();
> </script>
>
> </body>
>
> </html>
>
> ------------------------------
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *: xxx.xxx.xxxx
> > *: xxx.xxx.xxxx (FAX)
> > *: clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
> > ----------
> > From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> > Reply To: ASP Web HowTo
> > Sent: Tuesday, June 25, 2002 10:17 AM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] RE: body onload focus()
> >
> > It would be helpful to see your HTML...
> >
> > -----Original Message-----
> > From: Carlos Lamar [mailto:lamar@s...]
> > Sent: Tuesday, June 25, 2002 1:14 PM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] body onload focus()
> >
> >
> > Hello,
> >
> > I am using the following code:
> >
> > <body onload=3D"document.myform.first_name.focus();">
> >
> > However, when the page loads, I'm getting the following error
> message:
> >
> > Error: "document.myform.first_name" is not an object
> >
> > I've already ensured that there are no spelling errors in the form
> or
> > field names. How can I correct this? Your help is greatly
> > appreciated.
> >
> > Thanks!
> > ---Carlos
> >
> > ____________________________________________________
> > Carlos L. LaMar
> > Executive VP, IS & Management Development
> > snyder/newell, inc.
> > > *: xxx.xxx.xxxx
> > > *: xxx.xxx.xxxx (FAX)
> > > *: clamar@s...
> > > u http://www.snyder-newell.com/
> > >
> > >
> > >
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> >
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> > me
> > r-20
> > Constructing Accessible Web Sites
> >
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> > me
> > r-20
> > Practical JavaScript for the Usable Web
> >
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> > me
> > r-20
> >
> >
> > The information contained in this email is confidential and is
> > intended solely for the use of the person identified and intended as
> > the recipient. If you are not the intended recipient, any
> disclosure,
> > copying, distribution, or taking of any action in reliance on the
> > contents is prohibited. If you receive this message in error,
> contact
> > the sender immediately and delete it from your computer.
> >
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> >
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> > me
> > r-20
> > Constructing Accessible Web Sites
> >
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> > me
> > r-20
> > Practical JavaScript for the Usable Web
> >
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> > me
> > r-20
> >
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> me
> r-20
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> me
> r-20
>
Message #6 by "Carlos Lamar" <lamar@s...> on Tue, 25 Jun 2002 10:32:31 -0700
|
|
Hi, Shaun,
Thanks for responding... here is the my code:
------------------------------
<%@ Language=3DVBScript %>
<%
Dim msg, xsize
msg =3D Request.QueryString ("msg")
'prevent browsers from caching page
Response.Expires =3D 0
If Request("gb") =3D "1" Then
rec_added =3D "Record added"
Else
rec_added =3D "New record"
End If
%>
<html>
<head>
<meta http-equiv=3D"Content-Language" content=3D"en-us">
<meta name=3D"GENERATOR" content=3D"Microsoft FrontPage 5.0">
<meta name=3D"ProgId" content=3D"FrontPage.Editor.Document">
<meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3Dwindows-1252">
<title>New Page 1</title>
<meta name=3D"Microsoft Border" content=3D"tb">
</head>
<body onload=3D"document.MYFORM.first_name.focus()">
<p> </p>
<form name=3D"MYFORM" method=3D"POST" action=3D"rec_add.asp">
<center>
<table border=3D"0" cellpadding=3D"2" bordercolor=3D"#111111"
width=3D"479"
height=3D"82" bgcolor=3D"#B4B4B4" style=3D"border-collapse: collapse"
cellspacing=3D"0">
<tr>
<td width=3D"794" height=3D"76" align=3D"center" colspan=3D"2"
valign=3D"middle"><b>
<font face=3D"MS Sans Serif" size=3D"4">MYFORM<br>
Gift with Purchase Database</font></b></td>
</tr>
<tr>
<td width=3D"786" height=3D"22" align=3D"left" colspan=3D"2">
<font color=3D"#0000FF" face=3D"MS Sans Serif"><%=3D rec_added
%></font></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1;
border-top-style: solid; border-top-width: 1"><b><font face=3D"MS Sans
Serif">
First Name:</font></b></td>
<td width=3D"387" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1; border-top-style: solid; border-top-width: 1">
<input type=3D"text" name=3D"first_name" size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Last Name:</font></b></td>
<td width=3D"387" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1">
<input type=3D"text" name=3D"last_name" size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Firm:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"><input type=3D"text" name=3D"firm"
size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Address:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"><input type=3D"text" name=3D"line1"
size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"> </td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"><input type=3D"text" name=3D"line2"
size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
City:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"><input type=3D"text" name=3D"city"
size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
State:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"><select size=3D"1" name=3D"D1">
<OPTION selected value=3D>Select...</OPTION>
<OPTION value=3DAL>Alabama</OPTION>
<OPTION value=3DAK>Alaska</OPTION>
<OPTION value=3DAZ>Arizona</OPTION>
<OPTION value=3DAR>Arkansas</OPTION>
<OPTION value=3DCA>California</OPTION>
<OPTION value=3DCO>Colorado</OPTION>
<OPTION value=3DCT>Connecticut</OPTION>
<OPTION value=3DDE>Delaware</OPTION>
<OPTION value=3DDC>District of Columbia</OPTION>
<OPTION value=3DFL>Florida</OPTION>
<OPTION value=3DGA>Georgia</OPTION>
<OPTION value=3DHI>Hawaii</OPTION>
<OPTION value=3DID>Idaho</OPTION>
<OPTION value=3DIL>Illinois</OPTION>
<OPTION value=3DIN>Indiana</OPTION>
<OPTION value=3DIA>Iowa</OPTION>
<OPTION value=3DKS>Kansas</OPTION>
<OPTION value=3DKY>Kentucky</OPTION>
<OPTION value=3DLA>Lousiana</OPTION>
<OPTION value=3DME>Maine</OPTION>
<OPTION value=3DMD>Maryland</OPTION>
<OPTION value=3DMA>Massachussets</OPTION>
<OPTION value=3DMI>Michigan</OPTION>
<OPTION value=3DMN>Minnesota</OPTION>
<OPTION value=3DMS>Mississippi</OPTION>
<OPTION value=3DMO>Missouri</OPTION>
<OPTION value=3DMT>Montana</OPTION>
<OPTION value=3DNE>Nebraska</OPTION>
<OPTION value=3DNV>Nevada</OPTION>
<OPTION value=3DNH>New Hampshire</OPTION>
<OPTION value=3DNJ>New Jersey</OPTION>
<OPTION value=3DNM>New Mexico</OPTION>
<OPTION value=3DNY>New York</OPTION>
<OPTION value=3DNC>North Carolina</OPTION>
<OPTION value=3DND>North Dakota</OPTION>
<OPTION value=3DOH>Ohio</OPTION>
<OPTION value=3DOK>Oklahoma</OPTION>
<OPTION value=3DOR>Oregon</OPTION>
<OPTION value=3DPA>Pennsylvania</OPTION>
<OPTION value=3DRI>Rhode Island</OPTION>
<OPTION value=3DSC>South Carolina</OPTION>
<OPTION value=3DSD>South Dakota</OPTION>
<OPTION value=3DTX>Texas</OPTION>
<OPTION value=3DTN>Tennesee</OPTION>
<OPTION value=3DUT>Utah</OPTION>
<OPTION value=3DVT>Vermont</OPTION>
<OPTION value=3DVA>Virginia</OPTION>
<OPTION value=3DWA>Washington</OPTION>
<OPTION value=3DWV>West Virginia</OPTION>
<OPTION value=3DWI>Wisconson</OPTION>
<OPTION value=3DWY>Wyoming</OPTION>
<OPTION value=3D>--------------------</OPTION>
<OPTION value=3DAP>Armed Forces(APO)</OPTION>
<OPTION value=3DFPO>Armed Forces(FPO)</OPTION>
<OPTION value=3D>--------------------</OPTION>
<OPTION value=3DAB>Alberta</OPTION>
<OPTION value=3DBC>British Columbia</OPTION>
<OPTION value=3DMB>Manitoba</OPTION>
<OPTION value=3DNB>Brunswick</OPTION>
<OPTION value=3DNF>Newfoundland</OPTION>
<OPTION value=3DNT>Northwest Territory</OPTION>
<OPTION value=3DNS>Nova Scotia</OPTION>
<OPTION value=3DON>Ontario</OPTION>
<OPTION value=3DPE>Prince Edward Island</OPTION>
<OPTION value=3DQB>Quebec</OPTION>
<OPTION value=3DSK>Saskatchewan</OPTION>
<OPTION value=3DYT>Yukon Territory</OPTION>
<OPTION value=3D>--------------------</OPTION>
</select></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Zip:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1">
<input type=3D"text" name=3D"zip" size=3D"11"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"> </td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"> </td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Item Ordered:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"><select size=3D"1" name=3D"item">
<option value=3D"56798" selected>Convertible Tote Bag</option>
</select></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Qty Ordered:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1">
<!--webbot bot=3D"Validation" s-data-type=3D"Integer"
s-number-separators=3D"," --><input type=3D"text" name=3D"qty"
size=3D"6"
value=3D"1"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"> </td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1"> </td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Check #:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1">
<input type=3D"text" name=3D"check_num" size=3D"20"></td>
</tr>
<tr>
<td width=3D"399" height=3D"22" align=3D"right"
style=3D"border-right-style: solid; border-right-width: 1"><b><font
face=3D"MS Sans Serif">
Check Amount:</font></b></td>
<td width=3D"379" height=3D"22" style=3D"border-left-style:
solid;
border-left-width: 1">
$
<input type=3D"text" name=3D"check_amt" size=3D"11"
value=3D"0.00"></td>
</tr>
</table>
</center>
</div>
<p align=3D"center"><input type=3D"submit" value=3D"Add to Database"
name=3D"B1"> <input type=3D"reset" value=3D"Reset"
name=3D"B2"></p>
<p align=3D"center"> </p>
</form>
<script>
document.all.MYFORM.first_name.focus();
</script>
</body>
</html>
------------------------------
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
> ----------
> From: Shaun Steckley[SMTP:SSTECKLEY@P...]
> Reply To: ASP Web HowTo
> Sent: Tuesday, June 25, 2002 10:17 AM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: body onload focus()
>
> It would be helpful to see your HTML...
>
> -----Original Message-----
> From: Carlos Lamar [mailto:lamar@s...]
> Sent: Tuesday, June 25, 2002 1:14 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] body onload focus()
>
>
> Hello,
>
> I am using the following code:
>
> <body onload=3D"document.myform.first_name.focus();">
>
> However, when the page loads, I'm getting the following error message:
>
> Error: "document.myform.first_name" is not an object
>
> I've already ensured that there are no spelling errors in the form or
> field names. How can I correct this? Your help is greatly
> appreciated.
>
> Thanks!
> ---Carlos
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *: xxx.xxx.xxxx
> > *: xxx.xxx.xxxx (FAX)
> > *: clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> me
> r-20
>
>
> The information contained in this email is confidential and is
> intended solely for the use of the person identified and intended as
> the recipient. If you are not the intended recipient, any disclosure,
> copying, distribution, or taking of any action in reliance on the
> contents is prohibited. If you receive this message in error, contact
> the sender immediately and delete it from your computer.
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> me
> r-20
>
Message #7 by "Carlos Lamar" <lamar@s...> on Tue, 25 Jun 2002 10:14:20 -0700
|
|
Hello,
I am using the following code:
<body onload=3D"document.myform.first_name.focus();">
However, when the page loads, I'm getting the following error message:
Error: "document.myform.first_name" is not an object
I've already ensured that there are no spelling errors in the form or
field names. How can I correct this? Your help is greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
Message #8 by Shaun Steckley <SSTECKLEY@P...> on Tue, 25 Jun 2002 13:17:27 -0400
|
|
It would be helpful to see your HTML...
-----Original Message-----
From: Carlos Lamar [mailto:lamar@s...]
Sent: Tuesday, June 25, 2002 1:14 PM
To: ASP Web HowTo
Subject: [asp_web_howto] body onload focus()
Hello,
I am using the following code:
<body onload="document.myform.first_name.focus();">
However, when the page loads, I'm getting the following error message:
Error: "document.myform.first_name" is not an object
I've already ensured that there are no spelling errors in the form or
field names. How can I correct this? Your help is greatly appreciated.
Thanks!
---Carlos
____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *: xxx.xxx.xxxx
> *: xxx.xxx.xxxx (FAX)
> *: clamar@s...
> u http://www.snyder-newell.com/
>
>
>
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
The information contained in this email is confidential and is intended solely for the use of the person identified and intended as
the recipient. If you are not the intended recipient, any disclosure, copying, distribution, or taking of any action in reliance on
the contents is prohibited. If you receive this message in error, contact the sender immediately and delete it from your computer.
|
|
 |