Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with AJAX and Opera

Posted on 2006-06-20
6
Medium Priority
?
391 Views
Last Modified: 2008-02-01
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(Event.MOUSEMOVE);
}
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("tabla");
var vrste = tabla.getElementsByTagName("tr");
var kolona = vrste[j].getElementsByTagName("td");
if (!od)
{
od = true;
slika = kolona.innerHTML;
pami = i;
pamj = j;
}
else
{
od = false;
kolona.innerHTML = slika;
kolona = vrste[pamj].getElementsByTagName("td");
kolona[pami].innerHTML = "&nbsp;";

}
//alert(kolona.innerHTML);
}
function NapraviHelpZaglavlje()
{
var tabla = document.getElementById("helpzaglavlje").getElementsByTagName("tbody")[0];
var vrste = document.createElement("TR");
var kolona1 = document.createElement("TD");
// kolona1.setAttribute("colSpan",2);
kolona1.setAttribute("align","left");
kolona1.setAttribute("bgColor","#F69D9D");
kolona1.innerHTML = "&nbsp;<a href='javascript:history.back();'><img src='../images/back.gif' border=0>One move back</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='explorer.php'><img src='../images/new.gif' border=0>Reset</a>";
var kolona2 = document.createElement("TD");
kolona2.setAttribute("align","right");
kolona2.setAttribute("bgColor","#F69D9D");
kolona2.innerHTML ="<a href='ex_help.php'><img src='../images/help.gif' border=0>Help</a>&nbsp;&nbsp;";
var vrste2 = document.createElement("TR");
var kolona21 = document.createElement("TD");
kolona21.setAttribute("height",1);
kolona21.setAttribute("bgColor","#000000");
kolona21.setAttribute("colSpan",2);
vrste.appendChild(kolona1);
vrste.appendChild(kolona2);
vrste2.appendChild(kolona21);
tabla.appendChild(vrste);
tabla.appendChild(vrste2);
helpzaglavlje = true;
}
function ObrisiTabelu()
{
var tabla = document.getElementById("unosubazu");
var vel = tabla.rows.length;
for(i=0;i<vel-3;i++)
{
tabla.deleteRow(-1);
}
tabla = document.getElementById("unosubazu").getElementsByTagName("tbody")[0];
var vrste = document.createElement("TR");
var kolona = document.createElement("TD");
kolona.setAttribute("colSpan",3);
kolona.setAttribute("align","center");
kolona.innerHTML = "<span class='txt'>Searching...Please Wait</span>";
vrste.appendChild(kolona);
tabla.appendChild(vrste);

var tabla = document.getElementById("ecokodtabela");
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="+br_poteza+"&id_pred_fen="+id_pr_fen;
id_pred_fen = id_pr_fen;
}
if (nav == 2)//
{
url = "resiphpECO.php?br_poteza="+br_poteza+"&id_pred_fen="+id_pr_fen;
}
http.open("GET", url, true);
http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
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.XMLHTTP");
}
catch (othermicrosoft)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
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("unosubazu");
var vel = tabla.rows.length;
if (vel > 3)
tabla.deleteRow(-1);
var nizpovrstama=rez.split("#");
for(i=0;i<nizpovrstama.length-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("ecokodtabela");
var vel = tabla.rows.length;
var nizpovrstama=rez.split("#");
for(i=0;i<nizpovrstama.length-1;i++)
{
nizpokolonama=nizpovrstama.split("*");
DodajUECOTabelu(nizpokolonama[0], nizpokolonama[1], nizpokolonama[2]);
}
var tabla = document.getElementById("ecokodtabela").getElementsByTagName("tbody")[0];
var vrste = document.createElement("TR");
var kolona1 = document.createElement("TD");
kolona1.setAttribute("bgColor", "#000000");
kolona1.setAttribute("height",1);
kolona1.setAttribute("colSpan",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.getElementById("unosubazu") == null)
{
window.setTimeout('DodajUTabelu(move, number, result, pred_fen)', 100);
}
if (br_poteza%2 == 0)
{
tackice = ".&nbsp;.&nbsp;.&nbsp;";
br_za_prikaz = Math.floor(br_poteza/2);
}
else
{
tackice = ".&nbsp;";
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>&nbsp;");
if (move.charAt(0) == 'N') move = move.replace("N", "<img src='../images/N.gif' border=0 width=14 height=14>&nbsp;");
if (move.charAt(0) == 'B') move = move.replace("B", "<img src='../images/B.gif' border=0 width=14 height=14>&nbsp;");
if (move.charAt(0) == 'Q') move = move.replace("Q", "<img src='../images/Q.gif' border=0 width=14 height=14>&nbsp;");
if (move.charAt(0) == 'K') move = move.replace("K", "<img src='../images/K.gif' border=0 width=14 height=14>&nbsp;");

var tabla = document.getElementById("unosubazu").getElementsByTagName("tbody")[0];
var vrste = document.createElement("TR");
var kolona1 = document.createElement("TD");
kolona1.setAttribute("height", "25");
kolona1.setAttribute("align","left");
var kolona2 = document.createElement("TD");
kolona2.setAttribute("height", "25");
kolona2.setAttribute("align","center");
var kolona3 = document.createElement("TD");
kolona3.setAttribute("height", "25");
kolona1.innerHTML = "<a href='javascript:Start("+pred_fen+", 1);'>"+br_za_prikaz+tackice+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+ner+por));
duzina12 = Math.round(100*ner/(pob+ner+por));
duzina01 = Math.round(100*por/(pob+ner+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><table 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.getElementById("ecokodtabela") == null)
{
window.setTimeout('DodajUECOTabelu(eco, naziv, broj)', 100);
}

var tabla = document.getElementById("ecokodtabela").getElementsByTagName("tbody")[0];
var vrste = document.createElement("TR");
var kolona1 = document.createElement("TD");
kolona1.setAttribute("bgColor", "#F2C0C0");
kolona1.setAttribute("align","left");
kolona1.innerHTML = "<span class='BodyText'><strong>"+eco+"</strong> &nbsp;"+naziv+"</span>";
var kolona2 = document.createElement("TD");
kolona2.setAttribute("bgColor", "#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:hidden" name="dinamickimeni">
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#838282"><div align="center"><a href="../search.php">SEARCH 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">POSITION SEARCH</a></div></td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="384" height="125">&nbsp;</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/gensunasumus.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">&nbsp;</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/explorer1.php">SEARCH DATABASE</a></div></td>
<td width="10%"><div align="center"><a href="../login.php">MEMBERS</a></div></td>
<td width="10%"><div align="center"><a href="../sign-up.php">SIGN-UP</a></div></td>
<td width="10%"><div align="center"><a href="../support.php">SUPPORT</a></div></td>
<td width="10%"><div align="center"><a href="../contact.php">CONTACT</a></div></td>
<td width="35%" class="BodyText1">
<div align="right">
<?php
if ((!session_is_registered('imeses'))||(!session_is_registered('prezime'))||(!session_is_registered('e_mail')))
{
echo "Not logged";
$logovan = 0;
}
else
{
echo "<a href='../profil.php'>Welcome ".$_SESSION["imeses"]."</a>, <a href='../logout.php'>logout</a>";
$logovan = 1;
}
?>
</div>
</td>
</tr>
</table>
</td>
<td width="1" valign="top" background="../images/1x1.gif"></td>
<td width="167" valign="top">&nbsp;</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"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 0);"><img src="../images/bn.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 0);"><img src="../images/bb.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 0);"><img src="../images/bq.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 0);"><img src="../images/bk.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 0);"><img src="../images/bb.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 0);"><img src="../images/bn.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 0);"><img src="../images/br.gif"></td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 1);"><img src="../images/bp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 1);"><img src="../images/bp.gif"></td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 2);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 2);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 2);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 2);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 2);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 2);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 2);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 2);">&nbsp;</td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 3);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 3);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 3);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 3);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 3);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 3);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 3);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 3);">&nbsp;</td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 4);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 4);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 4);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 4);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 4);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 4);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 4);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 4);">&nbsp;</td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 5);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 5);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 5);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 5);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 5);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 5);">&nbsp;</td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 5);">&nbsp;</td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 5);">&nbsp;</td>
</tr>
<tr>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(0, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(1, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(2, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(3, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(4, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(5, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(6, 6);"><img src="../images/wp.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(7, 6);"><img src="../images/wp.gif"></td>
</tr>
<tr>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(0, 7);"><img src="../images/wr.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(1, 7);"><img src="../images/wn.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(2, 7);"><img src="../images/wb.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(3, 7);"><img src="../images/wq.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(4, 7);"><img src="../images/wk.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(5, 7);"><img src="../images/wb.gif"></td>
<td bgcolor='#99503A' align="center" width="40" height="40" onClick="PotezPocetak(6, 7);"><img src="../images/wn.gif"></td>
<td bgcolor='#EEEDDC' align="center" width="40" height="40" onClick="PotezPocetak(7, 7);"><img src="../images/wr.gif"></td>
</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">Search
database</a> &nbsp;|&nbsp; <span class="txtBezLinka">Move by Move</span> &nbsp;| &nbsp; <a href="../srch_pos/srch_pos.php">PositionSearch </a>&nbsp;</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 &copy; 2005 GensUnaSumus.com, &reg; 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.
0
Comment
Question by:KukiPei
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:bpmurray
ID: 16944395
I've got Opera 9 & it works just fine.
0
 

Author Comment

by:KukiPei
ID: 16946982
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
0
 
LVL 15

Expert Comment

by:bpmurray
ID: 16949599
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("ecokodtabela");
   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.length-1;i++) {
      nizpokolonama=nizpovrstama.split("*");
      DodajUECOTabelu(nizpokolonama[0], nizpokolonama[1], nizpokolonama[2]);
   }
   // You're reusing the "tabla" name - it might be better to use something else?
   var tabla = document.getElementById("ecokodtabela").getElementsByTagName("tbody")[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("bgColor", "#000000");
   kolona1.setAttribute("height",1);
   kolona1.setAttribute("colSpan",2);
   vrste.appendChild(kolona1);
   tabla.appendChild(vrste);
}
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:KukiPei
ID: 16950341
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()?
0
 
LVL 15

Accepted Solution

by:
bpmurray earned 540 total points
ID: 16950726
OK, not getting the readyState to 4 means that the XHR is in some unknown state. You need to actually force it to the stopped state. If you look at the Javascript console, it gives a weird error, which could be associated with this. I'd call abort at the top of the Start method. In fact, you could do something like:

     if (http.readyState != 4 && http.readyState != 0)
         http.abort();

0
 

Author Comment

by:KukiPei
ID: 16978322
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
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question