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 (Muchacho, Laurent (TWIi London))
  • Subject: [JavaScript] Simple Question
  • Date: Fri, 27 Jul 2001 14:03:51 +0100

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1169C.9A0F950A
Content-Type: text/plain;
	charset="big5"

Hi dude 
 
I will write it like that 
 
document.theName.style.left=theTrueLeft
 
 It work for me 
bob probably recommend a good documentation but don't mix jscript and
javascript it's not the same languages.
a other things Microsoft documentation doesn't bother with cross browser
implementation
then you code will work often only IE
 
Try that documentation 
 <http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm>
http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm

Laurent
 
 
 -----Original Message-----
From: Filipiak, Bob (Contractor) [mailto:filipiab@xxxxxxxxxxxxx]
Sent: 27 July 2001 13:32
To: 'javascript@xxxxxxxxxx'
Subject: RE: [JavaScript] Simple Question



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@xxxxxxxxxx [mailto:proton@xxxxxxxxxx]
Sent: Friday, July 27, 2001 2:02 AM
To: Javascript@xxxxxxxxxx
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
 


------_=_NextPart_001_01C1169C.9A0F950A
Content-Type: text/html;
	charset="big5"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">


<META content="MSHTML 5.00.3207.2500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=093035212-27072001>Hi 
dude </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=093035212-27072001>I will 
write it like that </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001>document.theName.style.left=theTrueLeft</SPAN></FONT></DIV>
<DIV><SPAN class=093035212-27072001></SPAN><FONT face=Tahoma><FONT size=2><SPAN 
class=093035212-27072001><FONT color=#0000ff 
face=Arial></FONT></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN class=093035212-27072001>&nbsp;<FONT 
color=#0000ff face=Arial>It work for me </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=093035212-27072001>bob 
probably recommend a good documentation but don't mix jscript and javascript 
it's not the same languages.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=093035212-27072001>a 
other things Microsoft documentation doesn't bother with cross browser 
implementation</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=093035212-27072001>then 
you code will work often only IE</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=093035212-27072001>Try 
that documentation </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff><SPAN class=093035212-27072001>
<P><A 
href="http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm";><FONT 
face=Arial 
size=2>http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm</FONT></A></P></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001>Laurent</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=093035212-27072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN 
class=093035212-27072001>&nbsp;</SPAN>-----Original Message-----<BR><B>From:</B> 
Filipiak, Bob (Contractor) [mailto:filipiab@xxxxxxxxxxxxx]<BR><B>Sent:</B> 27 
July 2001 13:32<BR><B>To:</B> 'javascript@xxxxxxxxxx'<BR><B>Subject:</B> RE: 
[JavaScript] Simple Question<BR><BR></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"></FONT>
  <DIV><SPAN class=589532712-27072001><FONT color=#0000ff face=Arial 
  size=2>First, go to <A 
  href="http://msdn.microsoft.com/scripting/";>http://msdn.microsoft.com/scripting/</A>&nbsp;and 
  download the jscript documentation.</FONT></SPAN></DIV>
  <DIV><SPAN class=589532712-27072001><FONT color=#0000ff face=Arial 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=589532712-27072001><FONT color=#0000ff face=Arial 
  size=2>AFAIK you problem may be because of the way you are using theName. Try 
  </FONT></SPAN></DIV>
  <DIV><SPAN class=589532712-27072001><FONT 
  face=Courier>document.all.item(theName).style.top=theTrueTop</FONT></SPAN></DIV>
  <DIV><SPAN class=589532712-27072001><FONT color=#0000ff face=Arial 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=589532712-27072001><FONT color=#0000ff face=Arial 
  size=2>Document.all[] takes an index value.</FONT></SPAN></DIV>
  <P><FONT size=2>Bob Filipiak (Contractor)<BR>MCP </FONT></P>
  <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
    <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma 
    size=2>-----Original Message-----<BR><B>From:</B> proton@xxxxxxxxxx 
    [mailto:proton@xxxxxxxxxx]<BR><B>Sent:</B> Friday, July 27, 2001 2:02 
    AM<BR><B>To:</B> Javascript@xxxxxxxxxx<BR><B>Subject:</B> [JavaScript] 
    Simple Question<BR><BR></FONT></DIV>
    <DIV><FONT face=Courier>function 
    KB_keepItInIE(theName,theWantTop,theWantLeft)<BR>{<BR>&nbsp;theRealTop=parseInt(document.body.scrollTop)<BR>&nbsp;theTrueTop=theWantTop+theRealTop<BR>&nbsp;document.all[theName].style.top=theTrueTop<BR>&nbsp;theRealLeft=parseInt(document.body.scrollLeft)<BR>&nbsp;theTrueLeft=theWantLeft+theRealLeft<BR>&nbsp;document.all[theName].style.left=theTrueLeft<BR>}<BR></FONT></DIV>
    <DIV><FONT face=Courier>Above is my JavaScript code segment, </FONT></DIV>
    <DIV><FONT face=Courier>sometimes IE told me document.all[''].style not an 
    object,</FONT></DIV>
    <DIV><FONT face=Courier>sometimes it seems OK!</FONT></DIV>
    <DIV><FONT face=Courier>I got confused and can't find out the 
    problem!!</FONT></DIV>
    <DIV><FONT face=Courier></FONT>&nbsp;</DIV>
    <DIV><FONT face=Courier>And, where can I find JavaScript Programming 
    Reference for IE?</FONT></DIV>
    <DIV><FONT face=Courier>Thanks for your kindly help!!</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=Courier>Best Regards,</FONT></DIV>
    <DIV><FONT face=Courier>Brad Kao</FONT></DIV>
    <DIV>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C1169C.9A0F950A--