Created
November 19, 2011 10:23
-
-
Save bjhaid/1378696 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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