KukiPei
asked on
Problem with AJAX and Opera
Hi to all.
I have one really difficult qustion, at least for me.
I'm working on some site using AJAX.
http://www.gensunasumus.com/movebymoveajax/mbymajax.php
Site is working fine with IE and Mozzila but with Opera, there is some problem.
You will understand better if you go and open site with upper browsers and click on moves on right side.
IE and Mozzila open information about openings below the chess table, but Opera doesn't.
this is the code:
<html>
<head>
<title>GensUnaSumus.com - Full Access to Biggest Online Chess Database Only Here</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="../images/stil.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style4 {color: #993300}
.style5 {color: #996633}
.style7 {color: #999966}
-->
</style>
<script src="../images/dinmeni.js" ></script>
<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">
var aktivan = 0;
window.onload = init;
function init() {
if (window.Event) {
document.captureEvents(Eve nt.MOUSEMO VE);
}
document.onmousemove = getXY;
}
</script>
<script language="javascript">
var od = false;
var slika = "";
var pami, pamj;
var helpzaglavlje = false;
function PotezPocetak(i, j)
{
var tabla = document.getElementById("t abla");
var vrste = tabla.getElementsByTagName ("tr");
var kolona = vrste[j].getElementsByTagN ame("td");
if (!od)
{
od = true;
slika = kolona.innerHTML;
pami = i;
pamj = j;
}
else
{
od = false;
kolona.innerHTML = slika;
kolona = vrste[pamj].getElementsByT agName("td ");
kolona[pami].innerHTML = " ";
}
//alert(kolona.innerHTML);
}
function NapraviHelpZaglavlje()
{
var tabla = document.getElementById("h elpzaglavl je").getEl ementsByTa gName("tbo dy")[0];
var vrste = document.createElement("TR ");
var kolona1 = document.createElement("TD ");
// kolona1.setAttribute("colS pan",2);
kolona1.setAttribute("alig n","left") ;
kolona1.setAttribute("bgCo lor","#F69 D9D");
kolona1.innerHTML = " <a href='javascript:history.b ack();'><i mg src='../images/back.gif' border=0>One move back</a> |  ; <a href='explorer.php'><img src='../images/new.gif' border=0>Reset</a>";
var kolona2 = document.createElement("TD ");
kolona2.setAttribute("alig n","right" );
kolona2.setAttribute("bgCo lor","#F69 D9D");
kolona2.innerHTML ="<a href='ex_help.php'><img src='../images/help.gif' border=0>Help</a> &nb sp;";
var vrste2 = document.createElement("TR ");
var kolona21 = document.createElement("TD ");
kolona21.setAttribute("hei ght",1);
kolona21.setAttribute("bgC olor","#00 0000");
kolona21.setAttribute("col Span",2);
vrste.appendChild(kolona1) ;
vrste.appendChild(kolona2) ;
vrste2.appendChild(kolona2 1);
tabla.appendChild(vrste);
tabla.appendChild(vrste2);
helpzaglavlje = true;
}
function ObrisiTabelu()
{
var tabla = document.getElementById("u nosubazu") ;
var vel = tabla.rows.length;
for(i=0;i<vel-3;i++)
{
tabla.deleteRow(-1);
}
tabla = document.getElementById("u nosubazu") .getElemen tsByTagNam e("tbody") [0];
var vrste = document.createElement("TR ");
var kolona = document.createElement("TD ");
kolona.setAttribute("colSp an",3);
kolona.setAttribute("align ","center" );
kolona.innerHTML = "<span class='txt'>Searching...Pl ease Wait</span>";
vrste.appendChild(kolona);
tabla.appendChild(vrste);
var tabla = document.getElementById("e cokodtabel a");
var vel = tabla.rows.length;
for(i=0;i<vel;i++)
{
tabla.deleteRow(-1);
}
}
</script>
<!-- AJAX script --->
<script type="text/javascript">
//var url = "resiphp.php"; // The server-side script
var br_poteza = 1;
var id_pred_fen = -1;
var navig = 1;//1 partije - 2 eco
function handleHttpResponse()
{
if (http.readyState == 4)
{
if(http.status==200)
{
var results=http.responseText;
if (navig == 1)//
{
ObradiRezultat(results);
return;
}
if (navig == 2)//
{
ObradiRezultatECO(results) ;
return;
}
}
}
}
function Start(id_pr_fen, nav)
{
navig = nav;
if (id_pr_fen != -1 && nav == 1)
{
ObrisiTabelu();
if (!helpzaglavlje) NapraviHelpZaglavlje();
}
if (nav == 1)//
{
url = "resiphp.php?br_poteza="+b r_poteza+" &id_pred_f en="+id_pr _fen;
id_pred_fen = id_pr_fen;
}
if (nav == 2)//
{
url = "resiphpECO.php?br_poteza= "+br_potez a+"&id_pre d_fen="+id _pr_fen;
}
http.open("GET", url, true);
http.setRequestHeader('Con tent-Type' , 'application/x-www-form-ur lencoded') ;
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function getHTTPObject()
{
var xmlhttp;
try
{
xmlhttp = new XMLHttpRequest();
// xmlhttp.overrideMimeType(' text/xml') ;
}
catch (trymicrosoft)
{
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLH TTP");
}
catch (othermicrosoft)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.X MLHTTP");
}
catch (failed)
{
xmlhttp = false;
}
}
}
if (!xmlhttp)
alert("Error initializing XMLHttpRequest!");
return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object
</script>
<script language="javascript">
function ObradiRezultat(rez)
{
var tabla = document.getElementById("u nosubazu") ;
var vel = tabla.rows.length;
if (vel > 3)
tabla.deleteRow(-1);
var nizpovrstama=rez.split("#" );
for(i=0;i<nizpovrstama.len gth-1;i++)
{
nizpokolonama=nizpovrstama .split("*" );
DodajUTabelu(nizpokolonama [0], nizpokolonama[1], nizpokolonama[2], nizpokolonama[3]);
}
br_poteza = br_poteza + 1;
// alert(id_pred_fen);
if (id_pred_fen != -1)
Start(id_pred_fen, 2);
}
function ObradiRezultatECO(rez)
{
var tabla = document.getElementById("e cokodtabel a");
var vel = tabla.rows.length;
var nizpovrstama=rez.split("#" );
for(i=0;i<nizpovrstama.len gth-1;i++)
{
nizpokolonama=nizpovrstama .split("*" );
DodajUECOTabelu(nizpokolon ama[0], nizpokolonama[1], nizpokolonama[2]);
}
var tabla = document.getElementById("e cokodtabel a").getEle mentsByTag Name("tbod y")[0];
var vrste = document.createElement("TR ");
var kolona1 = document.createElement("TD ");
kolona1.setAttribute("bgCo lor", "#000000");
kolona1.setAttribute("heig ht",1);
kolona1.setAttribute("colS pan",2);
vrste.appendChild(kolona1) ;
tabla.appendChild(vrste);
}
</script>
<!-- kraj AJAX script --->
<script language="javascript">
function DodajUTabelu(move, number, result, pred_fen)
{
if (move == "1-0" || move == "0-1" || move == "1/2")
return;
while(document.getElementB yId("unosu bazu") == null)
{
window.setTimeout('DodajUT abelu(move , number, result, pred_fen)', 100);
}
if (br_poteza%2 == 0)
{
tackice = ". . . ";
br_za_prikaz = Math.floor(br_poteza/2);
}
else
{
tackice = ". ";
br_za_prikaz = Math.floor(br_poteza/2)+1;
}
if (move.charAt(0) == 'R') move = move.replace("R", "<img src='../images/R.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'N') move = move.replace("N", "<img src='../images/N.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'B') move = move.replace("B", "<img src='../images/B.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'Q') move = move.replace("Q", "<img src='../images/Q.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'K') move = move.replace("K", "<img src='../images/K.gif' border=0 width=14 height=14> ");
var tabla = document.getElementById("u nosubazu") .getElemen tsByTagNam e("tbody") [0];
var vrste = document.createElement("TR ");
var kolona1 = document.createElement("TD ");
kolona1.setAttribute("heig ht", "25");
kolona1.setAttribute("alig n","left") ;
var kolona2 = document.createElement("TD ");
kolona2.setAttribute("heig ht", "25");
kolona2.setAttribute("alig n","center ");
var kolona3 = document.createElement("TD ");
kolona3.setAttribute("heig ht", "25");
kolona1.innerHTML = "<a href='javascript:Start("+p red_fen+", 1);'>"+br_za_prikaz+tackic e+move+"</ a>";
kolona2.innerHTML = "<span class='BodyText'>"+number+ "</span>";
var nizpobporner = result.split("-");
var pob = parseInt(nizpobporner[0]);
var ner = parseInt(nizpobporner[1]);
var por = parseInt(nizpobporner[2]);
//-------------racuna %-------------------
if ((pob+ner+por) != 0)
{
duzina10 = Math.round(100*pob/(pob+ne r+por));
duzina12 = Math.round(100*ner/(pob+ne r+por));
duzina01 = Math.round(100*por/(pob+ne r+por));
}
else
{
duzina10 = 0;
duzina12 = 0;
duzina01 = 0;
}
if (duzina10 == 0)
duzina10 ='';
else
duzina10 = duzina10+"%";
if (duzina12 == 0)
duzina12 ='';
else
duzina12 = duzina12+"%";
if (duzina01 == 0)
duzina01 ='';
else
duzina01 = duzina01+"%";
kolona3.innerHTML = "<TABLE cellSpacing=1 cellPadding=0 bgColor=#000000 border=0 width='100%'><TR><TD><tabl e width='100%' border=0 cellspacing=0 cellpadding=0><tr><td width='"+duzina10+"' bgcolor=#993300 align=center><FONT face=arial,helvetica color=#FFFFFF size=-2>"+duzina10+"</font ></td><td width='"+duzina12+"' bgcolor=#996633 align=center><FONT face=arial,helvetica color=#FFFFFF size=-2>"+duzina12+"</font ></td><td width='"+duzina01+"' bgcolor=#999966 align=center><FONT face=arial,helvetica color=#FFFFFF size=-2>"+duzina01+"</font ></TD></TR ></TABLE>< /td></tr>< /table>";
vrste.appendChild(kolona1) ;
vrste.appendChild(kolona2) ;
vrste.appendChild(kolona3) ;
tabla.appendChild(vrste);
}
function DodajUECOTabelu(eco, naziv, broj)
{
while(document.getElementB yId("ecoko dtabela") == null)
{
window.setTimeout('DodajUE COTabelu(e co, naziv, broj)', 100);
}
var tabla = document.getElementById("e cokodtabel a").getEle mentsByTag Name("tbod y")[0];
var vrste = document.createElement("TR ");
var kolona1 = document.createElement("TD ");
kolona1.setAttribute("bgCo lor", "#F2C0C0");
kolona1.setAttribute("alig n","left") ;
kolona1.innerHTML = "<span class='BodyText'><strong>" +eco+"</st rong> "+naziv+"</span>";
var kolona2 = document.createElement("TD ");
kolona2.setAttribute("bgCo lor", "#F2C0C0");
kolona2.innerHTML = "<span class='BodyText'>("+broj+" games)</span>";
vrste.appendChild(kolona1) ;
vrste.appendChild(kolona2) ;
tabla.appendChild(vrste);
}
</script>
</head>
<body>
<script language="javascript">
Start(-1, 1);
</script>
<div id="dinamickimeni" style="top:0px; left:0px; width:120px; height:50px; position:absolute; z-index:1;visibility:hidde n" name="dinamickimeni">
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#838282"><div align="center"><a href="../search.php">SEARC H DATABASE</a></div></td>
</tr>
<tr>
<td bgcolor="#838282"><div align="center"><a href="explorer1.php">MOVE BY MOVE</a></div></td>
</tr>
<tr>
<td bgcolor="#838282"><div align="center"><a href="../srch_pos/srch_pos .php">POSI TION SEARCH</a></div></td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="384" height="125"> </td>
<td width="1" height="125"><img src="../images/1x1.gif" width="1" height="125"></td>
<td width="351" height="125" bgcolor="F2C0C0" valign="bottom"><div align="right"><img src="../images/gensunasumu s.gif" width="350" height="86"></div></td>
<td width="1"><img src="../images/1x1.gif" width="1" height="125"></td>
<td width="167" height="125"> </td>
</tr>
<tr>
<td height="1" bgcolor="#000000" colspan="4"><img src="images/1x1.gif" height="1"></td>
<td height="1"><img src="../images/1x1.gif" width="75" height="1"></td>
</tr>
<tr>
<td height="19" colspan="3" bgcolor="#838282">
<table width="100%" cellspacing="0">
<tr>
<td width="9%"><div align="center"><a href="../index.php">HOME</ a></div></ td>
<td width="16%" onMouseOver="Over();"><div align="center" id="searchdatabase"><a href="../explorer/explorer 1.php">SEA RCH DATABASE</a></div></td>
<td width="10%"><div align="center"><a href="../login.php">MEMBER S</a></div ></td>
<td width="10%"><div align="center"><a href="../sign-up.php">SIGN -UP</a></d iv></td>
<td width="10%"><div align="center"><a href="../support.php">SUPP ORT</a></d iv></td>
<td width="10%"><div align="center"><a href="../contact.php">CONT ACT</a></d iv></td>
<td width="35%" class="BodyText1">
<div align="right">
<?php
if ((!session_is_registered(' imeses'))| |(!session _is_regist ered('prez ime'))||(! session_is _registere d('e_mail' )))
{
echo "Not logged";
$logovan = 0;
}
else
{
echo "<a href='../profil.php'>Welco me ".$_SESSION["imeses"]."</a >, <a href='../logout.php'>logou t</a>";
$logovan = 1;
}
?>
</div>
</td>
</tr>
</table>
</td>
<td width="1" valign="top" background="../images/1x1. gif"></td>
<td width="167" valign="top"> </td>
</tr>
<tr>
<td height="1" bgcolor="#000000" colspan="4"><img src="../images/1x1.gif" height="1"></td>
<td height="1"><img src="../images/1x1.gif" width="75" height="1"></td>
</tr>
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="helpzaglavlje">
<tbody>
</tbody>
</table>
<table border="0" cellspacing="3" cellpadding="0" id="tabla">
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 0);"><img src="../images/br.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 0);"><img src="../images/bn.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 0);"><img src="../images/bb.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 0);"><img src="../images/bq.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 0);"><img src="../images/bk.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 0);"><img src="../images/bb.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 0);"><img src="../images/bn.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 0);"><img src="../images/br.gif"></t d>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 1);"><img src="../images/bp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 1);"><img src="../images/bp.gif"></t d>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 2);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 2);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 2);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 2);"> </td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 3);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 3);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 3);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 3);"> </td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 4);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 4);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 4);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 4);"> </td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 5);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 5);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 5);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 5);"> </td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 6);"><img src="../images/wp.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 6);"><img src="../images/wp.gif"></t d>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 7);"><img src="../images/wr.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 7);"><img src="../images/wn.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 7);"><img src="../images/wb.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 7);"><img src="../images/wq.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 7);"><img src="../images/wk.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 7);"><img src="../images/wb.gif"></t d>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 7);"><img src="../images/wn.gif"></t d>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 7);"><img src="../images/wr.gif"></t d>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td bgcolor="#000000" height="1"></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="ecokodtabela">
<tbody>
</tbody>
</table>
</td>
<td background="../images/1x1. gif"></td>
<!----------------- ovde podaci iz baze -------------------------- --->
<td valign="top" bgcolor="#F2C0C0">
<table width="100%" cellspacing="0" id="unosubazu">
<tbody>
<tr>
<td height="19" bgcolor="#F69D9D" colspan="3"><div align="center"><a href="../search.php">Searc h
database</a> | <span class="txtBezLinka">Move by Move</span> | <a href="../srch_pos/srch_pos .php">Posi tionSearch </a> </div></td>
</tr>
<tr>
<td bgcolor="#000000" height="1" colspan="3"></td>
</tr>
<tr>
<td width="23%" class="txt"><div align="center">Move</div>< /td>
<td width="36%" class="txt"><div align="center">Number of games</div></td>
<td width="41%" align="center" class="txt"><div align="center"><span class="style8 style4">win</span> - <span class="style5">draw</span> - <span class="style6"><span class="style9 style7">loss</span> </span>%</div></td>
</tr>
</tbody>
</table>
</td>
<td background="../images/1x1. gif"></td>
</tr>
<tr>
<td height="1" colspan="4" bgcolor="#000000"></td>
<td height="1"><img src="../images/1x1.gif" width="75" height="1"></td>
</tr>
<tr>
<td colspan="3" align="right"><div align="right" class="footer">Optimized
for IE 6+, Mozzila and Opera!<br>
Copyright © 2005 GensUnaSumus.com, ® All Rights Reserved
</div></td>
</tr>
</table>
</body>
</html>
So does anybody know where is the problem.
I'm using Opera 8.5
Best Regards.
I have one really difficult qustion, at least for me.
I'm working on some site using AJAX.
http://www.gensunasumus.com/movebymoveajax/mbymajax.php
Site is working fine with IE and Mozzila but with Opera, there is some problem.
You will understand better if you go and open site with upper browsers and click on moves on right side.
IE and Mozzila open information about openings below the chess table, but Opera doesn't.
this is the code:
<html>
<head>
<title>GensUnaSumus.com - Full Access to Biggest Online Chess Database Only Here</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="../images/stil.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style4 {color: #993300}
.style5 {color: #996633}
.style7 {color: #999966}
-->
</style>
<script src="../images/dinmeni.js"
<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">
var aktivan = 0;
window.onload = init;
function init() {
if (window.Event) {
document.captureEvents(Eve
}
document.onmousemove = getXY;
}
</script>
<script language="javascript">
var od = false;
var slika = "";
var pami, pamj;
var helpzaglavlje = false;
function PotezPocetak(i, j)
{
var tabla = document.getElementById("t
var vrste = tabla.getElementsByTagName
var kolona = vrste[j].getElementsByTagN
if (!od)
{
od = true;
slika = kolona.innerHTML;
pami = i;
pamj = j;
}
else
{
od = false;
kolona.innerHTML = slika;
kolona = vrste[pamj].getElementsByT
kolona[pami].innerHTML = " ";
}
//alert(kolona.innerHTML);
}
function NapraviHelpZaglavlje()
{
var tabla = document.getElementById("h
var vrste = document.createElement("TR
var kolona1 = document.createElement("TD
// kolona1.setAttribute("colS
kolona1.setAttribute("alig
kolona1.setAttribute("bgCo
kolona1.innerHTML = " <a href='javascript:history.b
var kolona2 = document.createElement("TD
kolona2.setAttribute("alig
kolona2.setAttribute("bgCo
kolona2.innerHTML ="<a href='ex_help.php'><img src='../images/help.gif' border=0>Help</a> &nb
var vrste2 = document.createElement("TR
var kolona21 = document.createElement("TD
kolona21.setAttribute("hei
kolona21.setAttribute("bgC
kolona21.setAttribute("col
vrste.appendChild(kolona1)
vrste.appendChild(kolona2)
vrste2.appendChild(kolona2
tabla.appendChild(vrste);
tabla.appendChild(vrste2);
helpzaglavlje = true;
}
function ObrisiTabelu()
{
var tabla = document.getElementById("u
var vel = tabla.rows.length;
for(i=0;i<vel-3;i++)
{
tabla.deleteRow(-1);
}
tabla = document.getElementById("u
var vrste = document.createElement("TR
var kolona = document.createElement("TD
kolona.setAttribute("colSp
kolona.setAttribute("align
kolona.innerHTML = "<span class='txt'>Searching...Pl
vrste.appendChild(kolona);
tabla.appendChild(vrste);
var tabla = document.getElementById("e
var vel = tabla.rows.length;
for(i=0;i<vel;i++)
{
tabla.deleteRow(-1);
}
}
</script>
<!-- AJAX script --->
<script type="text/javascript">
//var url = "resiphp.php"; // The server-side script
var br_poteza = 1;
var id_pred_fen = -1;
var navig = 1;//1 partije - 2 eco
function handleHttpResponse()
{
if (http.readyState == 4)
{
if(http.status==200)
{
var results=http.responseText;
if (navig == 1)//
{
ObradiRezultat(results);
return;
}
if (navig == 2)//
{
ObradiRezultatECO(results)
return;
}
}
}
}
function Start(id_pr_fen, nav)
{
navig = nav;
if (id_pr_fen != -1 && nav == 1)
{
ObrisiTabelu();
if (!helpzaglavlje) NapraviHelpZaglavlje();
}
if (nav == 1)//
{
url = "resiphp.php?br_poteza="+b
id_pred_fen = id_pr_fen;
}
if (nav == 2)//
{
url = "resiphpECO.php?br_poteza=
}
http.open("GET", url, true);
http.setRequestHeader('Con
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function getHTTPObject()
{
var xmlhttp;
try
{
xmlhttp = new XMLHttpRequest();
// xmlhttp.overrideMimeType('
}
catch (trymicrosoft)
{
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLH
}
catch (othermicrosoft)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.X
}
catch (failed)
{
xmlhttp = false;
}
}
}
if (!xmlhttp)
alert("Error initializing XMLHttpRequest!");
return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object
</script>
<script language="javascript">
function ObradiRezultat(rez)
{
var tabla = document.getElementById("u
var vel = tabla.rows.length;
if (vel > 3)
tabla.deleteRow(-1);
var nizpovrstama=rez.split("#"
for(i=0;i<nizpovrstama.len
{
nizpokolonama=nizpovrstama
DodajUTabelu(nizpokolonama
}
br_poteza = br_poteza + 1;
// alert(id_pred_fen);
if (id_pred_fen != -1)
Start(id_pred_fen, 2);
}
function ObradiRezultatECO(rez)
{
var tabla = document.getElementById("e
var vel = tabla.rows.length;
var nizpovrstama=rez.split("#"
for(i=0;i<nizpovrstama.len
{
nizpokolonama=nizpovrstama
DodajUECOTabelu(nizpokolon
}
var tabla = document.getElementById("e
var vrste = document.createElement("TR
var kolona1 = document.createElement("TD
kolona1.setAttribute("bgCo
kolona1.setAttribute("heig
kolona1.setAttribute("colS
vrste.appendChild(kolona1)
tabla.appendChild(vrste);
}
</script>
<!-- kraj AJAX script --->
<script language="javascript">
function DodajUTabelu(move, number, result, pred_fen)
{
if (move == "1-0" || move == "0-1" || move == "1/2")
return;
while(document.getElementB
{
window.setTimeout('DodajUT
}
if (br_poteza%2 == 0)
{
tackice = ". . . ";
br_za_prikaz = Math.floor(br_poteza/2);
}
else
{
tackice = ". ";
br_za_prikaz = Math.floor(br_poteza/2)+1;
}
if (move.charAt(0) == 'R') move = move.replace("R", "<img src='../images/R.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'N') move = move.replace("N", "<img src='../images/N.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'B') move = move.replace("B", "<img src='../images/B.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'Q') move = move.replace("Q", "<img src='../images/Q.gif' border=0 width=14 height=14> ");
if (move.charAt(0) == 'K') move = move.replace("K", "<img src='../images/K.gif' border=0 width=14 height=14> ");
var tabla = document.getElementById("u
var vrste = document.createElement("TR
var kolona1 = document.createElement("TD
kolona1.setAttribute("heig
kolona1.setAttribute("alig
var kolona2 = document.createElement("TD
kolona2.setAttribute("heig
kolona2.setAttribute("alig
var kolona3 = document.createElement("TD
kolona3.setAttribute("heig
kolona1.innerHTML = "<a href='javascript:Start("+p
kolona2.innerHTML = "<span class='BodyText'>"+number+
var nizpobporner = result.split("-");
var pob = parseInt(nizpobporner[0]);
var ner = parseInt(nizpobporner[1]);
var por = parseInt(nizpobporner[2]);
//-------------racuna %-------------------
if ((pob+ner+por) != 0)
{
duzina10 = Math.round(100*pob/(pob+ne
duzina12 = Math.round(100*ner/(pob+ne
duzina01 = Math.round(100*por/(pob+ne
}
else
{
duzina10 = 0;
duzina12 = 0;
duzina01 = 0;
}
if (duzina10 == 0)
duzina10 ='';
else
duzina10 = duzina10+"%";
if (duzina12 == 0)
duzina12 ='';
else
duzina12 = duzina12+"%";
if (duzina01 == 0)
duzina01 ='';
else
duzina01 = duzina01+"%";
kolona3.innerHTML = "<TABLE cellSpacing=1 cellPadding=0 bgColor=#000000 border=0 width='100%'><TR><TD><tabl
vrste.appendChild(kolona1)
vrste.appendChild(kolona2)
vrste.appendChild(kolona3)
tabla.appendChild(vrste);
}
function DodajUECOTabelu(eco, naziv, broj)
{
while(document.getElementB
{
window.setTimeout('DodajUE
}
var tabla = document.getElementById("e
var vrste = document.createElement("TR
var kolona1 = document.createElement("TD
kolona1.setAttribute("bgCo
kolona1.setAttribute("alig
kolona1.innerHTML = "<span class='BodyText'><strong>"
var kolona2 = document.createElement("TD
kolona2.setAttribute("bgCo
kolona2.innerHTML = "<span class='BodyText'>("+broj+"
vrste.appendChild(kolona1)
vrste.appendChild(kolona2)
tabla.appendChild(vrste);
}
</script>
</head>
<body>
<script language="javascript">
Start(-1, 1);
</script>
<div id="dinamickimeni" style="top:0px; left:0px; width:120px; height:50px; position:absolute; z-index:1;visibility:hidde
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#838282"><div align="center"><a href="../search.php">SEARC
</tr>
<tr>
<td bgcolor="#838282"><div align="center"><a href="explorer1.php">MOVE BY MOVE</a></div></td>
</tr>
<tr>
<td bgcolor="#838282"><div align="center"><a href="../srch_pos/srch_pos
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="384" height="125"> </td>
<td width="1" height="125"><img src="../images/1x1.gif" width="1" height="125"></td>
<td width="351" height="125" bgcolor="F2C0C0" valign="bottom"><div align="right"><img src="../images/gensunasumu
<td width="1"><img src="../images/1x1.gif" width="1" height="125"></td>
<td width="167" height="125"> </td>
</tr>
<tr>
<td height="1" bgcolor="#000000" colspan="4"><img src="images/1x1.gif" height="1"></td>
<td height="1"><img src="../images/1x1.gif" width="75" height="1"></td>
</tr>
<tr>
<td height="19" colspan="3" bgcolor="#838282">
<table width="100%" cellspacing="0">
<tr>
<td width="9%"><div align="center"><a href="../index.php">HOME</
<td width="16%" onMouseOver="Over();"><div
<td width="10%"><div align="center"><a href="../login.php">MEMBER
<td width="10%"><div align="center"><a href="../sign-up.php">SIGN
<td width="10%"><div align="center"><a href="../support.php">SUPP
<td width="10%"><div align="center"><a href="../contact.php">CONT
<td width="35%" class="BodyText1">
<div align="right">
<?php
if ((!session_is_registered('
{
echo "Not logged";
$logovan = 0;
}
else
{
echo "<a href='../profil.php'>Welco
$logovan = 1;
}
?>
</div>
</td>
</tr>
</table>
</td>
<td width="1" valign="top" background="../images/1x1.
<td width="167" valign="top"> </td>
</tr>
<tr>
<td height="1" bgcolor="#000000" colspan="4"><img src="../images/1x1.gif" height="1"></td>
<td height="1"><img src="../images/1x1.gif" width="75" height="1"></td>
</tr>
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="helpzaglavlje">
<tbody>
</tbody>
</table>
<table border="0" cellspacing="3" cellpadding="0" id="tabla">
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 0);"><img src="../images/br.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 0);"><img src="../images/bn.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 0);"><img src="../images/bb.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 0);"><img src="../images/bq.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 0);"><img src="../images/bk.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 0);"><img src="../images/bb.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 0);"><img src="../images/bn.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 0);"><img src="../images/br.gif"></t
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 1);"><img src="../images/bp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 1);"><img src="../images/bp.gif"></t
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 2);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 2);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 2);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 2);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 2);"> </td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 3);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 3);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 3);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 3);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 3);"> </td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 4);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 4);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 4);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 4);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 4);"> </td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 5);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 5);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 5);"> </td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 5);"> </td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 5);"> </td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 6);"><img src="../images/wp.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 6);"><img src="../images/wp.gif"></t
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 7);"><img src="../images/wr.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 7);"><img src="../images/wn.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 7);"><img src="../images/wb.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 7);"><img src="../images/wq.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 7);"><img src="../images/wk.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 7);"><img src="../images/wb.gif"></t
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 7);"><img src="../images/wn.gif"></t
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 7);"><img src="../images/wr.gif"></t
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td bgcolor="#000000" height="1"></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="ecokodtabela">
<tbody>
</tbody>
</table>
</td>
<td background="../images/1x1.
<!----------------- ovde podaci iz baze --------------------------
<td valign="top" bgcolor="#F2C0C0">
<table width="100%" cellspacing="0" id="unosubazu">
<tbody>
<tr>
<td height="19" bgcolor="#F69D9D" colspan="3"><div align="center"><a href="../search.php">Searc
database</a> | <span class="txtBezLinka">Move by Move</span> | <a href="../srch_pos/srch_pos
</tr>
<tr>
<td bgcolor="#000000" height="1" colspan="3"></td>
</tr>
<tr>
<td width="23%" class="txt"><div align="center">Move</div><
<td width="36%" class="txt"><div align="center">Number of games</div></td>
<td width="41%" align="center" class="txt"><div align="center"><span class="style8 style4">win</span> - <span class="style5">draw</span>
</tr>
</tbody>
</table>
</td>
<td background="../images/1x1.
</tr>
<tr>
<td height="1" colspan="4" bgcolor="#000000"></td>
<td height="1"><img src="../images/1x1.gif" width="75" height="1"></td>
</tr>
<tr>
<td colspan="3" align="right"><div align="right" class="footer">Optimized
for IE 6+, Mozzila and Opera!<br>
Copyright © 2005 GensUnaSumus.com, ® All Rights Reserved
</div></td>
</tr>
</table>
</body>
</html>
So does anybody know where is the problem.
I'm using Opera 8.5
Best Regards.
I've got Opera 9 & it works just fine.
ASKER
Hi bpmurray
Now I have intalled Opera 9 and still not working.
For example when you open site with Opera and click on 1.e4
after that you should get list of next moves on right and that working OK.
and below chess table you shoud get this list:
B22 Sicilian, Alapin (15756 games)
B01 Scandinavian (10197 games)
B33 Sicilian (9029 games)
B07 Pirc (8925 games)
B06 Robatsch (8431 games)
B23 Sicilian, Closed (7492 games)
B30 Sicilian (6594 games)
C02 French, Advance (6461 games)
B12 Caro-Kann Defense (5937 games)
C42 Petrov Defense (5331 games)
and this works on IE and mozzila but doesn't on Opera.
Did you get this list?
Best Regards
Now I have intalled Opera 9 and still not working.
For example when you open site with Opera and click on 1.e4
after that you should get list of next moves on right and that working OK.
and below chess table you shoud get this list:
B22 Sicilian, Alapin (15756 games)
B01 Scandinavian (10197 games)
B33 Sicilian (9029 games)
B07 Pirc (8925 games)
B06 Robatsch (8431 games)
B23 Sicilian, Closed (7492 games)
B30 Sicilian (6594 games)
C02 French, Advance (6461 games)
B12 Caro-Kann Defense (5937 games)
C42 Petrov Defense (5331 games)
and this works on IE and mozzila but doesn't on Opera.
Did you get this list?
Best Regards
You're right: I'm pretty certain it worked yesterday, but it doesn't now. Unfortunately without the ability to edit/test the code, it's pretty much impossible for me to identify the issue. However, it's clear that the problem lies somewhere in the function ObradiRezultatECO. Since Opera doesn't have any debugging tools, I suggest adding alerts as below. I would also suggest making sure tha the XmlHttpRequest has completed before reusing it by calling http.abort().
function ObradiRezultatECO(rez) {
var tabla = document.getElementById("e cokodtabel a");
var vel = tabla.rows.length;
var nizpovrstama=rez.split("#" );
alert("I got " + nizpovrstama.length " entries"); // Debug to verify we got stuff
for(i=0;i<nizpovrstama.len gth-1;i++) {
nizpokolonama=nizpovrstama .split("*" );
DodajUECOTabelu(nizpokolon ama[0], nizpokolonama[1], nizpokolonama[2]);
}
// You're reusing the "tabla" name - it might be better to use something else?
var tabla = document.getElementById("e cokodtabel a").getEle mentsByTag Name("tbod y")[0];
alert("tabla=" + tabla); // This will display null if it's wrong!
// Shouldn't you delete any existing elements in the tbody?
var vrste = document.createElement("TR ");
var kolona1 = document.createElement("TD ");
kolona1.setAttribute("bgCo lor", "#000000");
kolona1.setAttribute("heig ht",1);
kolona1.setAttribute("colS pan",2);
vrste.appendChild(kolona1) ;
tabla.appendChild(vrste);
}
function ObradiRezultatECO(rez) {
var tabla = document.getElementById("e
var vel = tabla.rows.length;
var nizpovrstama=rez.split("#"
alert("I got " + nizpovrstama.length " entries"); // Debug to verify we got stuff
for(i=0;i<nizpovrstama.len
nizpokolonama=nizpovrstama
DodajUECOTabelu(nizpokolon
}
// You're reusing the "tabla" name - it might be better to use something else?
var tabla = document.getElementById("e
alert("tabla=" + tabla); // This will display null if it's wrong!
// Shouldn't you delete any existing elements in the tbody?
var vrste = document.createElement("TR
var kolona1 = document.createElement("TD
kolona1.setAttribute("bgCo
kolona1.setAttribute("heig
kolona1.setAttribute("colS
vrste.appendChild(kolona1)
tabla.appendChild(vrste);
}
ASKER
I allready tryed something like that. It seems to me that script even doesnt call function ObradiRezultatECO.
When I tested with some ather alert in function handleHttpResponse I never get readyState to be 4, so script doesn't call ObradiRezultatECO.
Where to put http.abort()?
When I tested with some ather alert in function handleHttpResponse I never get readyState to be 4, so script doesn't call ObradiRezultatECO.
Where to put http.abort()?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have found the solution.
http://www.elitesecurity.org/tema/183160-Problem-sa-Operom-AJAX-om
I just put http = getHTTPObject();
in Start function and now is working in Opera 9.0
Thanks anyway
http://www.elitesecurity.org/tema/183160-Problem-sa-Operom-AJAX-om
I just put http = getHTTPObject();
in Start function and now is working in Opera 9.0
Thanks anyway