Skip to content

Instantly share code, notes, and snippets.

@bjhaid
Created November 19, 2011 10:23
Show Gist options
  • Save bjhaid/1378696 to your computer and use it in GitHub Desktop.
Save bjhaid/1378696 to your computer and use it in GitHub Desktop.
<script language="JavaScript">
document.writeln("<table border=0><tr><td><FORM name=BoardForm><table border=0><tr><td>");
SetBGColor="assets/images";
if ((BGColor!="")&&(document.getElementsByTagName)) document.getElementsByTagName('BODY')[0].style.backgroundColor=BGColor;
ImagePath="../assets/";
if (ImagePath!="") SetBorder(0);
EvalUrlString("SetBorder");
EvalUrlString("SetBorderColor");
WriteBoard(1);
WriteButtons();
WritePosition();
document.writeln("</td></tr></table></FORM>");
Init('');
AllowRecording(true);
//EvalUrlString();
//write the following with ASP or PHP depending on your data from a database:
RotateBoard(true);
ApplyPgnMoveText('<%= @game.move.html_safe %>');
AddText("</td><td>"+ '<h3><%= @game.white %> - <%= @game.black %></h3>' +GetHTMLMoveText(0,0,1));
document.writeln("</td></tr></table>");
setTimeout('RefreshBoard(true)',1000);
if (window.event) document.captureEvents(Event.KEYDOWN);
document.onkeydown = KeyDown;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment