File: chemeq_components

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (36 lines) | stat: -rw-r--r-- 1,432 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
slib_lang_exists_tmp=yes

slib_title=Chemical components
slib_parms=4\
 , chemical equation\
 , [optional] the word <span class="tt">htmlbuttons</span> followed by a space and one number\
 , [optional] the word <span class="tt">shuffle</span>\
 , [optional] a list of words to be appended, enclosed in brackets. Some words are magical: \
 <span class="tt">extra</span> expands to '+,->' ; <span class="tt">redox_extra</span> expands to 'H^+_aq,OH^-_aq,H2O,e^-'.

slib_out= Outputs a matrix of the reactives in the first line, and the products in \
the second line. <br/>If the parameter <span class="tt">htmlbuttons</span> is specified, the output \
is some code to make clickable buttons; then, the number refers to a reply \
field which will receive the results of the buttons' events. <br/>If the \
parameter <span class="tt">shuffle</span> is specified, the buttons are shuffled. <br/>These buttons \
can be made active if the following javascript code is added in the page: \
<pre style="color:green;">\
&lt;script type="text/javascript"&gt;\
function getInput(n){\
  f=window.document.forms[0];\
  for(i=0; i&lt;f.elements.length; i=i+1){\
    if (f.elements[i].name=="reply"+n) { \
      return f.elements[i];\
    }\
  }\
  return null;\
}\
function appendToInput(n,msg){\
  var i=getInput(n);\
  i.value=i.value+msg+' ';\
  i.focus();\
}\
&lt;/script&gt;\
</pre>

slib_comment=use the syntax accepted by the command chemeq