Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] onFocus getting error.


  • From: javascript@xxxxxxxxxx (Craig Gardner)
  • Subject: [Javascript] onFocus getting error.
  • Date: Mon, 27 Jan 2003 11:15:57 -0800

This is a multi-part message in MIME format.

------_=_NextPart_001_01C2C638.854BBB1A
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Here's the function call:
---function call ---
<input type=3D'textarea' onFocus=3D'javascript:gotMe(this, 6);'>
=20
Here's the function:
--- function code ---
   function gotMe(current, length)
   {
    current.maxLength =3D length;
    current.select;
   }
=20
The error that I'm getting says that there's an error on the function =
call
line:
--- error message ---
Line:    112
Char:    1
Error:    Object expected
Code:    0
=20
Does anyone have any ideas?  The only way that I've found that fixes =
this
problem is getting rid of the onFocus part.  Even commenting the entire
function body doesn't fix it.

------_=_NextPart_001_01C2C638.854BBB1A
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial size=3D2>Here's =
the function=20
call:</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial =
size=3D2>---function call=20
---</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial =
size=3D2>&lt;input=20
type=3D'textarea' onFocus=3D'javascript:gotMe(this, =
6);'&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial size=3D2>Here's =
the=20
function:</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial size=3D2>--- =
function code=20
---</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;=20
function gotMe(current, length)<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;=20
current.maxLength =3D length;<BR>&nbsp;&nbsp;&nbsp;=20
current.select;<BR>&nbsp;&nbsp; }</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial size=3D2>The =
error that I'm=20
getting says that there's an error on the function call=20
line:</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial size=3D2>--- =
error message=20
---</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2>Line:&nbsp;&nbsp;&nbsp; 112</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2>Char:&nbsp;&nbsp;&nbsp; 1</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2>Error:&nbsp;&nbsp;&nbsp; Object expected</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2>Code:&nbsp;&nbsp;&nbsp; 0</FONT></SPAN></DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D256331119-27012003><FONT face=3DArial size=3D2>Does =
anyone have any=20
ideas?&nbsp; The only way that I've found that fixes this problem is =
getting rid=20
of the onFocus part.&nbsp; Even commenting the entire function body =
doesn't fix=20
it.</FONT></SPAN></DIV></BODY></HTML>
=00
------_=_NextPart_001_01C2C638.854BBB1A--