Yes, these sure are valid points. It appears my ie is 7 (so also dated) but the point is that I am facing problems with making an app names siteinfile transform my page into an exe. I instantly connected it with the errors in ie, which do not manifest themselves in chrome, firefox adn opera, admittedly, newer.
Here's the code without the line breaks, and "item" changed to "Sache".
I may gave undertaken a wrong approach in assuming that seasoned js coders would catch any flaws in the code like this, and
this is what my question is about: is the JS piece of code written properly?
While in chrome the buttons switch between three kinds of toys, in ie7 they take no effect - nothing shows up.
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<body onLoad="ST()" >
<center>
<table border="0">
<tbody>
<tr>
<td><form name="sache">
<pre> </pre>
<table border="0" cellspacing="0" cellpadding="0"
width=1000px>
<tr>
<td height="89"> </td>
</tr>
<tr>
<td height="82"><p>toy
<input type="TEXT" name="a" size="20" value=""
id="okno">
</p>
<p>
<input type="button" value=" UP "
onClick="dawaj()">
<input type="button" value=" DOWN "
onClick="dawaj2()">
</p></td>
</tr>
<tr>
<td height="78"> </td>
</tr>
</table>
<center>
</center>
</form>
</tbody>
</table>
</center>
<script>
n=1;
function
SH(v){zz=v.length;for(i=1;i<(zz);i++){y=r(zz);x=r(zz);z=v[y];v[y]=v[x];v[x
]=z}}
function ST(){SH(sache);b=sache.length;}
function dawaj(){
n=n+1; if (n>b-1){n=1}
if(sache[n]==null){n=0};x=sache[n];v=new Array;x=x+"|";i=0;while(x.length>1){l=x.substring(0,x.indexOf("|"));v[i]=l
;i++;x=x.substring(x.indexOf("|")+1)};
document.sache.a.value=v[0];
}
function dawaj2(){
//
n=n-1;if (n<1){n=b-1}
if(sache[n]==null){n=0};x=sache[n];v=new
Array;x=x+"|";i=0;while(x.length>1){l=x.substring(0,x.indexOf("|"));v[i]=l
;i++;x=x.substring(x.indexOf("|")+1)};
document.sache.a.value=v[0];
}
function r(){}
sache=new Array("","boy|strong|brave","girl|pretty|smart","dog|furry|friendly");
</script>
</body>
</html>