<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Try to do this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">if(!document.getElementById('msgsubject')) 
showCompose();</SPAN></FONT><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p><FONT 
color=#ff0000>&nbsp;<FONT face=Arial>setTimeout("</P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">document.getElementById('msgto').value 
= document.getElementById('msgto').value + toid + ";"</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">document.getElementById('msgtoname').innerHTML 
= document.getElementById('msgtoname').innerHTML + toname + "; 
";</SPAN></FONT></P>
<P class=MsoNormal>",500);</FONT></FONT></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">It would 
make a sllep until the objects has been created.</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">If 
needed, you ought to increase the time of setTimeout.</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">Hope 
help.</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">João 
Cândido de Souza Neto<BR>Curitiba Online<BR><A 
href="mailto:joao@curitibaonline.com.br">joao@curitibaonline.com.br</A><BR>(41) 
3324-2294 (41) 9985-6894<BR><A 
href="http://www.curitibaonline.com.br">http://www.curitibaonline.com.br</A></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'"></SPAN></FONT>&nbsp;</P></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=lists@dwsasia.com href="mailto:lists@dwsasia.com">Peter Lauri</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu 
  href="mailto:javascript@LaTech.edu">'[JavaScript List]'</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, August 18, 2006 4:49 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] Sleep, or something 
  else...</DIV>
  <DIV><FONT face=Arial size=2></FONT><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have 
  this:<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">if(!document.getElementById('msgsubject')) 
  showCompose();</SPAN></FONT><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">document.getElementById('msgto').value 
  = document.getElementById('msgto').value + toid + ";"</SPAN></FONT><FONT 
  face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">;<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; BACKGROUND: white; FONT-FAMILY: 'Courier New'">document.getElementById('msgtoname').innerHTML 
  = document.getElementById('msgtoname').innerHTML + toname + "; 
  ";</SPAN></FONT><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The showCompose() creates element 
  with id msgto and msgtoname. However, it is not recorded. However, if I put an 
  alert() in between it detects it. This makes me believe that it is actually 
  going a little bit too fast for my script, so that the msgto and msgtoname 
  does not have time to be created, so they can not be found (error in script). 
  The alert() seam to give the script enough time for the elements to be 
  created, and it works, hrm :)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Anyone with 
  insights?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">/Peter<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Javascript mailing 
  list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></BLOCKQUOTE></BODY></HTML>