[JavaScript] Simple Question

Filipiak, Bob (Contractor) filipiab at atsc.army.mil
Fri Jul 27 07:32:18 CDT 2001


First, go to http://msdn.microsoft.com/scripting/
<http://msdn.microsoft.com/scripting/>  and download the jscript
documentation.
 
AFAIK you problem may be because of the way you are using theName. Try 
document.all.item(theName).style.top=theTrueTop
 
Document.all[] takes an index value.

Bob Filipiak (Contractor)
MCP 

-----Original Message-----
From: proton at iii.org.tw [mailto:proton at iii.org.tw]
Sent: Friday, July 27, 2001 2:02 AM
To: Javascript at LaTech.edu
Subject: [JavaScript] Simple Question


function KB_keepItInIE(theName,theWantTop,theWantLeft)
{
 theRealTop=parseInt(document.body.scrollTop)
 theTrueTop=theWantTop+theRealTop
 document.all[theName].style.top=theTrueTop
 theRealLeft=parseInt(document.body.scrollLeft)
 theTrueLeft=theWantLeft+theRealLeft
 document.all[theName].style.left=theTrueLeft
}

Above is my JavaScript code segment, 
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
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010727/5af1ab7b/attachment.htm>


More information about the Javascript mailing list