Created
December 16, 2020 21:01
-
-
Save cybear/d2461b02c52e93f4be3ddfbdf851d9e1 to your computer and use it in GitHub Desktop.
serverside js from 2006
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function renderLinkArray(linkArray) { | |
// rendering the array | |
kc.pl("<ul>"); | |
for (var i = 0; i < linkArray.length; i++) { | |
cssClass = linkArray[i].completed ? "check" : "uncheck"; | |
kc.pl('<li class="' + cssClass + '">'); | |
kc.pl("<strong>" + linkArray[i].header + "</strong>"); | |
kc.pl("<br/>"); | |
if (linkArray[i].url.length > 0) { | |
kc.p('<a href="' + linkArray[i].url + '">'); | |
kc.p(linkArray[i].linkname); | |
kc.pl("</a>"); | |
} else { | |
kc.pl(linkArray[i].linkname); | |
} | |
kc.pl("</li>"); | |
} | |
kc.pl("</ul>"); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment