view awesome_js/echo.js @ 77:bf68c9ea9528 laserkard

saving
author Robert McIntyre <rlm@mit.edu>
date Thu, 22 Jul 2010 09:30:45 -0400
parents 375225442677
children
line wrap: on
line source
1 function js_process_func(input)
3 {
5 document.getElementById('perlClick').innerHTML = input;
7 }
11 function parseFile()
12 {
13 document.getElementById('output').innerHTML = "function called";
15 var JSONtext = document.getElementById('textEntry').value;
17 var hash = new Object();
18 hash = eval('(' + JSONtext + ')');
19 document.getElementById('output').innerHTML = "";
20 document.getElementById('perlClick').innerHTML = "";
23 for (card in hash)
24 {
25 document.getElementById('output').innerHTML = card;
26 clearAll();
27 lineDraw(eval("hash." + card + ".style"), "ff0000");
29 for (prop in eval( "hash." + card + ".fields"))
30 {
34 contentRedraw(eval("hash." + card + ".style"), prop, eval( "hash." + card + ".fields." + prop));
36 document.getElementById('output').innerHTML += "<br>" + eval( "hash." + card + ".fields." + prop);
38 }
40 for (var ii = 1; ii <= eval("hash." + card + ".number"); ii++)
41 {
43 document.getElementById('perlClick').innerHTML += document.getElementById('disp_contain').innerHTML + "S3ntinEL";
44 //echo(['disp_contain', 'perlClick', num], [js_process_func], 'POST');
45 }
46 }
49 var emmm = document.getElementById('sendOff').value;
53 echo(['perlClick', "args__" + emmm], ['pokedex'], 'POST');
57 }