You are not logged in.
login | register

Discussion: Developer's Area
Topic: JavaScript Question


Post a new topic to the Developers Discussion discussion
<< see all messages in this topic
<previous message    


Subject:   RE: JavaScript Question
Author: dgrissom
Date: Dec 6 2004
Your problem lies in the spaces and the <br>. Here is a snippet of code that
should work...
///////////////////////////////////////////////////////////////
//==================1===================
if (checkloop <= 1){loopend=loop1;}
if (checkloop > 1){loopend = looper;}
for(n=1; n<=loopend; n++){
for(m=1; m<=div; m++){
pic=pic + "|" ;
}
pic = pic +n+"  ";
quotient=quotient+1;
}
display = display +pic;
pic="";

//=============== 2 ============================
if (checkloop <=2 ){loopend = loop1;}
if (checkloop > 2 ){loopend = (looper*2);}
for(n=(looper+1); n<=loopend; n++){
for(m=1; m<=div; m++){
pic=pic + "|" ;
}
pic = pic+n+"  ";
quotient=quotient+1;
}

display = display +pic;
pic="";

//=============== 3 ============================
if (checkloop > 2 ){loopend = loop1;}
for(n=(looper*2+1); n<=loopend; n++){
for(m=1; m<=div; m++){
pic=pic + "|" ;
}
pic = pic+n+"  ";
quotient=quotient+1;
}

display = display +pic;
pic="";

//////////////////////////////////////////////////////

Hope this works for you.

Reply to this message          Quote this message when replying?
yes  no
Post a new topic to the Developers Discussion discussion

Discussion Help