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] Simple Question


  • From: javascript@xxxxxxxxxx (高煥明)
  • Subject: [JavaScript] Simple Question
  • Date: Fri, 27 Jul 2001 14:02:03 +0800

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C116A4.B6446DB0
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

function KB_keepItInIE(theName,theWantTop,theWantLeft)
{
 theRealTop=3DparseInt(document.body.scrollTop)
 theTrueTop=3DtheWantTop+theRealTop
 document.all[theName].style.top=3DtheTrueTop
 theRealLeft=3DparseInt(document.body.scrollLeft)
 theTrueLeft=3DtheWantLeft+theRealLeft
 document.all[theName].style.left=3DtheTrueLeft
}

Above is my JavaScript code segment,=20
sometimes IE told me document.all[''].style not an object,
sometimes it seems OK!
I got confused and can't find out the problem!!

And, where can I find JavaScript Programming Reference for IE?
Thanks for your kindly help!!

Best Regards,
Brad Kao


------=_NextPart_000_0005_01C116A4.B6446DB0
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dbig5" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier>function=20
KB_keepItInIE(theName,theWantTop,theWantLeft)<BR>{<BR>&nbsp;theRealTop=3D=
parseInt(document.body.scrollTop)<BR>&nbsp;theTrueTop=3DtheWantTop+theRea=
lTop<BR>&nbsp;document.all[theName].style.top=3DtheTrueTop<BR>&nbsp;theRe=
alLeft=3DparseInt(document.body.scrollLeft)<BR>&nbsp;theTrueLeft=3DtheWan=
tLeft+theRealLeft<BR>&nbsp;document.all[theName].style.left=3DtheTrueLeft=
<BR>}<BR></FONT></DIV>
<DIV><FONT face=3DCourier>Above is my JavaScript code segment, =
</FONT></DIV>
<DIV><FONT face=3DCourier>sometimes IE told me document.all[''].style =
not an=20
object,</FONT></DIV>
<DIV><FONT face=3DCourier>sometimes it seems OK!</FONT></DIV>
<DIV><FONT face=3DCourier>I got confused and can't find out the=20
problem!!</FONT></DIV>
<DIV><FONT face=3DCourier></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier>And, where can I find JavaScript Programming =
Reference=20
for IE?</FONT></DIV>
<DIV><FONT face=3DCourier>Thanks for your kindly help!!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>Best Regards,</FONT></DIV>
<DIV><FONT face=3DCourier>Brad Kao</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0005_01C116A4.B6446DB0--