Mercurial > laserkard
diff awesome_js/echo.js @ 51:95fa4bcc5d67 laserkard
[svn r52] implemented SVG backend
author | rlm |
---|---|
date | Wed, 03 Feb 2010 03:14:09 -0500 |
parents | |
children | 375225442677 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/awesome_js/echo.js Wed Feb 03 03:14:09 2010 -0500 1.3 @@ -0,0 +1,57 @@ 1.4 +function js_process_func(input) 1.5 + 1.6 +{ 1.7 + 1.8 + document.getElementById('perlClick').innerHTML = input; 1.9 + 1.10 +} 1.11 + 1.12 + 1.13 + 1.14 +function parseFile() 1.15 +{ 1.16 + document.getElementById('output').innerHTML = "function called"; 1.17 + 1.18 + var JSONtext = document.getElementById('textEntry').value; 1.19 + 1.20 + var hash = new Object(); 1.21 + hash = eval('(' + JSONtext + ')'); 1.22 + document.getElementById('output').innerHTML = ""; 1.23 + document.getElementById('perlClick').innerHTML = ""; 1.24 + 1.25 + 1.26 + for (card in hash) 1.27 + { 1.28 + document.getElementById('output').innerHTML = card; 1.29 + clearAll(); 1.30 + lineDraw(eval("hash." + card + ".style"), "ff0000"); 1.31 + 1.32 + for (prop in eval( "hash." + card + ".fields")) 1.33 + { 1.34 + 1.35 + 1.36 + 1.37 + contentRedraw(eval("hash." + card + ".style"), prop, eval( "hash." + card + ".fields." + prop)); 1.38 + 1.39 +document.getElementById('output').innerHTML += "<br>" + eval( "hash." + card + ".fields." + prop); 1.40 + 1.41 + } 1.42 + 1.43 + for (var ii = 1; ii <= eval("hash." + card + ".number"); ii++) 1.44 + { 1.45 + 1.46 + document.getElementById('perlClick').innerHTML += document.getElementById('disp_contain').innerHTML + "S3ntinEL"; 1.47 + //echo(['disp_contain', 'perlClick', num], [js_process_func], 'POST'); 1.48 + } 1.49 + } 1.50 + 1.51 + 1.52 + var emmm = document.getElementById('sendOff').value; 1.53 + 1.54 + 1.55 + 1.56 + echo(['perlClick', "args__" + emmm], ['output'], 'POST'); 1.57 + 1.58 + 1.59 + 1.60 +}