I'm trying to centralize buttons on an interface which uses the innerHTML property
The interface looks like this: http://i.imgur.com/JVD0F9I.png
Here's the code as to where I assume the buttons call from:
function fightdelay(tstatus) {
if (lastaction != "m" && lastaction != "t" && lastaction != "o" && lastaction != "v" && lastaction != "k2" && lastaction != "k3" && lastaction != "rf" && lastaction != "q") {
if (mx == 1) {
top.toiminta.attb.innerHTML = "<input type=button value=' use weapon ' id='btn_attack' name='btn_attack' onclick='top.fightAction();'>";
top.toiminta.casb.innerHTML = "<input type=button value=' cast spell ' id='btn_cast' name='btn_cast' onclick='top.castAction();'>";
}
top.toiminta.nefb.innerHTML = "<input type=button value=' new fight ' onclick='top.newFightAction();'>";
}
}
function delNF() {
top.toiminta.nefb.innerHTML = "<input type=button value=' new fight ' onclick='void(#);'>";
}
function s_c() {
top.chat.document.msg.btn_chat.disabled = true;
}
function getRandomButtonText(nbr) {
return "...";
}
function getRandomNum() {
var rndNum = Math.random()
rndNum = parseInt(rndNum * 1000);
rndNum = (rndNum % 94) + 33;
return rndNum;
}
Take into account that this is from a game from early 2001