Hey, I'm a developer for another forum. We have limited access to our forums templates and the ftp server because our owner is M.I.A
I'm wondering if this code can be improved. I'm not an master coder or anything. And I don't have as much experience with jscript as I should lol.
What I did to make this code work is place a div inside a forum thread for my mods to edit and add member's stats.
the div looks like this:
Code:
<div id="rankings"> Username,2,2,4</div>
The first number is wins, the second is losses, the third is how many games have been played.
var myIFrame= document.getElementById('podloga').contentWindow.document.getElementById('rankings').innerHTML;
var lista=new Array();
var konacnalista= new Array();
lista= myIFrame.split("<br>");
var i=0;
for(i=0; i<lista.length-1;i++){
konacnalista.push(lista[i].split(","));
}
I anything needs to be known just ask.
I appreciate any help :)
12-04-2012, 07:33 AM
ReFreezed
How do you call bubbleSort? Or rather, what is 'a'? If you just want to sort an array you could just use the Array.sort method and specify your own sort function.
Also note that using eval() can create a security flaw on your website and is generally discouraged to use.
Finally, do you mean JavaScript or do you really mean JScript? (They are both based on the ECMAScript standard, but I'm just curious...)