Well, I keep having problems.
I’m trying to make a link harvester for this Chatroom.
Because my friends post way too many links and I never get to view them all.
So I was trying to make something to fix that.
Html is roughly:
<td style=”vertical-align: bottom; font-size: 14px;” id=”X110″>
<p class=”a”>
<b style=”color: Green;”>asdfasa</b>:
<a target=”_blank” title=”Click to open in new window” href=”
</p>
<p class=”a”>
<b style=”color: Green;”>asdfasa</b>:
<a target=”_blank” title=”Click to open in new window” href=”
</p>
<p class=”a”>
<b style=”color: Green;”>asdfasa</b>:
<a target=”_blank” title=”Click to open in new window” href=”
</p>
</td>
My javascript was:
var Links=new Array();
function XLink() {
var num = X110.getElementsByTagName(“a”).length;
for(i=0;num=i;i++) {
t=1;
for(q=0;Links.length=q;q++) {
if (X110.getElementsByTagName(“a”)[i-1].href == Links[i-1]){
t=0;
}
}
if (t){
Links[i] = X110.getElementsByTagName(“a”)[i-1].href;
}
}
}
I want to make sure that I’m not saving the same links over and over. So I want them to check through the array first.
But I keep getting the value undefined.
The chat site is:
[url]http://www.chatzy.com/
If that matters.