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> theRealTop=3D=
parseInt(document.body.scrollTop)<BR> theTrueTop=3DtheWantTop+theRea=
lTop<BR> document.all[theName].style.top=3DtheTrueTop<BR> theRe=
alLeft=3DparseInt(document.body.scrollLeft)<BR> theTrueLeft=3DtheWan=
tLeft+theRealLeft<BR> 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> </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> </DIV>
<DIV><FONT face=3DCourier>Best Regards,</FONT></DIV>
<DIV><FONT face=3DCourier>Brad Kao</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0005_01C116A4.B6446DB0--
- Follow-Ups:
- [JavaScript] Simple Question
- From: Andrew Gibson
- [JavaScript] Simple Question
- From: Andrew Gibson
- [JavaScript] Simple Question
- Prev by Date: [Javascript] Tabbing past the bottom of the window
- Next by Date: [JavaScript] Simple Question
- Previous by thread: [Javascript] Save as Incomplete or Submit
- Next by thread: [JavaScript] Simple Question
- Index(es):