annotate awesome_js/echo.js @ 63:3d3b8671de71
laserkard
[svn r64] Changed
1. About page text to agreed on 4/1/10
2. top_menu link "The Story" --> "About"
author |
hong |
date |
Thu, 01 Apr 2010 20:06:28 -0400 |
parents |
375225442677 |
children |
|
rev |
line source |
rlm@51
|
1 function js_process_func(input)
|
rlm@51
|
2
|
rlm@51
|
3 {
|
rlm@51
|
4
|
rlm@51
|
5 document.getElementById('perlClick').innerHTML = input;
|
rlm@51
|
6
|
rlm@51
|
7 }
|
rlm@51
|
8
|
rlm@51
|
9
|
rlm@51
|
10
|
rlm@51
|
11 function parseFile()
|
rlm@51
|
12 {
|
rlm@51
|
13 document.getElementById('output').innerHTML = "function called";
|
rlm@51
|
14
|
rlm@51
|
15 var JSONtext = document.getElementById('textEntry').value;
|
rlm@51
|
16
|
rlm@51
|
17 var hash = new Object();
|
rlm@51
|
18 hash = eval('(' + JSONtext + ')');
|
rlm@51
|
19 document.getElementById('output').innerHTML = "";
|
rlm@51
|
20 document.getElementById('perlClick').innerHTML = "";
|
rlm@51
|
21
|
rlm@51
|
22
|
rlm@51
|
23 for (card in hash)
|
rlm@51
|
24 {
|
rlm@51
|
25 document.getElementById('output').innerHTML = card;
|
rlm@51
|
26 clearAll();
|
rlm@51
|
27 lineDraw(eval("hash." + card + ".style"), "ff0000");
|
rlm@51
|
28
|
rlm@51
|
29 for (prop in eval( "hash." + card + ".fields"))
|
rlm@51
|
30 {
|
rlm@51
|
31
|
rlm@51
|
32
|
rlm@51
|
33
|
rlm@51
|
34 contentRedraw(eval("hash." + card + ".style"), prop, eval( "hash." + card + ".fields." + prop));
|
rlm@51
|
35
|
rlm@51
|
36 document.getElementById('output').innerHTML += "<br>" + eval( "hash." + card + ".fields." + prop);
|
rlm@51
|
37
|
rlm@51
|
38 }
|
rlm@51
|
39
|
rlm@51
|
40 for (var ii = 1; ii <= eval("hash." + card + ".number"); ii++)
|
rlm@51
|
41 {
|
rlm@51
|
42
|
rlm@51
|
43 document.getElementById('perlClick').innerHTML += document.getElementById('disp_contain').innerHTML + "S3ntinEL";
|
rlm@51
|
44 //echo(['disp_contain', 'perlClick', num], [js_process_func], 'POST');
|
rlm@51
|
45 }
|
rlm@51
|
46 }
|
rlm@51
|
47
|
rlm@51
|
48
|
rlm@51
|
49 var emmm = document.getElementById('sendOff').value;
|
rlm@51
|
50
|
rlm@51
|
51
|
rlm@51
|
52
|
rlm@52
|
53 echo(['perlClick', "args__" + emmm], ['pokedex'], 'POST');
|
rlm@51
|
54
|
rlm@51
|
55
|
rlm@51
|
56
|
rlm@51
|
57 }
|