Mercurial > laserkard
comparison awesome_js/robert.js @ 79:343dc947f999 laserkard
read JavaSctipt: the good parts
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 25 Jul 2010 01:33:22 -0400 |
parents | 781127893010 |
children |
comparison
equal
deleted
inserted
replaced
78:4ebd94bfecda | 79:343dc947f999 |
---|---|
72 } | 72 } |
73 | 73 |
74 | 74 |
75 } | 75 } |
76 | 76 |
77 //~ function smallRedraw(style,field) | |
78 //~ { | |
79 //~ //smallRedraw(style,field,"fefefe"); | |
80 //~ sRedraw(style,field,'fefefe'); | |
81 //~ } | |
82 | 77 |
83 | 78 |
84 function smallRedraw(style,field) | 79 function smallRedraw(style,field) |
85 { | 80 { |
86 | 81 |
87 var JSONtext = document.getElementById('formValues').innerHTML; | 82 var JSONtext = document.getElementById('formValues').innerHTML; |
88 var hash = new Object(); | 83 var hash = new Object(); |
89 hash = eval('(' + JSONtext + ')'); | 84 hash = eval('(' + JSONtext + ')'); |
90 | 85 |
91 var content = eval("hash."+field); | 86 var content = eval("hash."+field); |
92 | 87 |
93 content = unescape(content); | 88 content = unescape(content); |
94 | 89 |
95 //if (prevVal == content){return;} | 90 |
96 | 91 contentRedraw(style,field, content); |
97 contentRedraw(style,field, content); | |
98 | |
99 | |
100 } | 92 } |
101 | 93 |
102 | 94 |
103 | 95 |
104 function contentRedraw(style,field, content) | 96 function contentRedraw(style,field, content) |