<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>If you like to cycle one by one you have to use some init event for that.</DIV> <DIV>&nbsp;</DIV> <DIV>with the for statement all you can manage is to cycle to the last content<FONT color=#ff6699>n</FONT><BR>of you're variables, and have it displayed as it was the first and the last one!</DIV> <DIV>If you like it to cycle with time intervals you have to use the time interval, else you can use the timeout of displaying</DIV> <DIV>the current content\n.</DIV> <DIV>or if you need to use the click event than you want be needing timers</DIV> <DIV>you have to create a click counter as a simple solution</DIV> <DIV>or if you like to use the onmouseover event, than you can simplify it with event.srcElement</DIV> <DIV>for exaple some titles you mouse over that changes the, -for instance, &lt;div&gt; content</DIV> <DIV>but before I write any script for you I have to know the real purpose.</DIV> <DIV>&nbsp;</DIV> <DIV>until next time</DIV> <DIV>Cheers</DIV> <DIV>&nbsp;</DIV> <DIV><BR></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>&nbsp;Thomas Wheeler</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B>&nbsp;Thursday, May 03, 2001 2:15 AM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B>&nbsp;Javascript@LaTech.edu</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B>&nbsp;[Javascript] simple array</DIV> <DIV><BR></DIV>Trying to learn, if I have a series of variables like content1, content2, etc..&nbsp; and I want to cycle through them<BR>can I write a for loop?&nbsp; Here's my current code:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (obj != content1) hide(content1);<BR>&nbsp; if (obj != content2) hide(content2);<BR>&nbsp; if (obj != content3) hide(content3);<BR>&nbsp; if (obj != content4) hide(content4);<BR>&nbsp; if (obj != content5) hide(content5);<BR>&nbsp; if (obj != content6) hide(content6);<BR>&nbsp; <BR>Here's what I've been trying to do:<BR><BR>function show(obj) {&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //show the obj here<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(i = 1; i &lt; 7; i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (obj != content + [i]) hide(content + [i]);<BR>}<BR><BR>this doesn't work, and other variations of it I've tried are also unsuccessful.&nbsp; I know I could list all the variables, but isn't there a more concise way? <BR><BR>Tom Wheeler<BR><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>http://www.LaTech.edu/mailman/listinfo/javascript<BR> <DIV></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></DIV>