If you can't tell I am new at using JavaScript. Can someone lead me in the right direction with this script? I am trying to display these links if the name is equal to a specific value. Sorry for the hassle and thanks in advance.
function getLinks(status){
var my_array = new Array();
if(status == "JOHN SMITH"){
<a href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"Link1.html">Link 1</a>
<a href = "Link2.html">Link 2</a>
<a href = "Link3.html">Link 3</a>
my_array[0] = document.anchors("Link 1");
my_array[1] = document.anchors("Link 2");
my_array[2] = document.anchors("Link 3");
}
for (i = 0; i < my_array.length; i++) {
document.write(my_array);
}
}
}
function getLinks(status){
var my_array = new Array();
if(status == "JOHN SMITH"){
<a href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"Link1.html">Link 1</a>
<a href = "Link2.html">Link 2</a>
<a href = "Link3.html">Link 3</a>
my_array[0] = document.anchors("Link 1");
my_array[1] = document.anchors("Link 2");
my_array[2] = document.anchors("Link 3");
}
for (i = 0; i < my_array.length; i++) {
document.write(my_array);
}
}
}