I am lost in a JavaScript For Loop !! Can someone help me please. Here is my code:
var stringlength = frm.titleInfo.value.length;
FOR LOOP IN HERE
FOR (indexofcolon<=stringlength)
{
indexofsemi = frm.titleInfo.value.indexOf(“;”,indexofsemi+1);
element = frm.titleInfo.value.substring(indexofcolon,indexofsemi);
indexofcolon = frm.titleInfo.value.indexOf(“:”,indexofcolon+1);
name = frm.titleInfo.value.substring(indexofsemi+1,indexofcolon);
doc.getElementById(element).title = name;
}
I have a long string that finishes with a colon. I collect the index of the colon in my code. What I want is the code to loop until the value of indexofcolon equals the string length. Can someone amend my code please. I have looked in the book but am more of a lotusscript man.
Thanks
Paul