<script type="text/javascript">
!!! this is used for filling_in the inputfields myinput[n] after a return: the inputfields are present in a variable-string and thus can "not be filled" by wims... note: if $embed=1 ... WIMS will fill in the rejected answer...see below [id=myinput]
function refill
(){var hi
="$(reply$n)";if(hi
.length
!=0){hi
=hi
.split(',');for(var i
=0;i
<hi
.length
;i
++){document
.getElementById
("myinput"+i
).value
=hi
[i
];}}}
</script>
<script type="text/javascript" src="$jsdir/wz_dragdrop.js"></script>
<p align="center">
<table>
<tr>
<td>
<table bgcolor=$bgcolor1 cellpadding=$cellpadding cellspacing=$cellspacing>
<tr>
<td valign="top" align="left">
!if $(question$n) != $empty
$(question$n)
!endif
!if $(formula$n) != $empty
<center>
<table>
<tr>
<th>
!insmath $(formula$n)
</th>
!if $embed=1
<th>
$m_rightarrow
</th>
<th>
<form name="myform1">
!if $wims_user=supervisor
<textarea id="myinput" style=$textareastyle wrap=off cols=$cols rows=$rows name="reply$n">$(answer$n)</textarea>
!else
<textarea id="myinput" style=$textareastyle wrap=off cols=$cols rows=$rows name="reply$n">$(reply$n)</textarea>
!endif
</form>
</th>
!endif
</tr>
</table>
</center>
!endif
!if $exotext != $empty
$exotext
!endif
</td>
!if $image=1
!if $XSIZE>450
</tr><tr>
!endif
<td valign="top" align="center">
!if $draw=1
!! for fly
!set ins_attr=name="image$n" id="image$n"
!set insdraw_size=$XSIZE,$YSIZE
!insdraw $(image$n)
!else
!if $plot=1
!! for GNUplot
!set ins_attr=name="image$n" id="image$n"
!set insplot_set=$(image_settings$n)
!insplot $(image$n)
!endif
!endif
</td>
!endif
!if $applet=1
!if $XSIZE>450
</tr><tr>
!endif
<td valign="top" align="center">
$(object$n)
</td>
!endif
!if $javascript != $empty
!if $XSIZE>450
</tr><tr>
!endif
<td>
!! this
file handles the input
!read $javascript
</td>
!endif
</tr>
</table>
</td>
</tr>
!! sometimes a better place
for the buttons
....$javascript does not need to
define them in this
case.
!if $inputs=yes
<td align="center">
<table>
<tr>
<th>
<input type=button style="$mybuttonstyle" onclick="sendanswer();" value="$send">
</th>
<th>
<input type=button style="$mybuttonstyle" onclick="dontknow();" name="but2" value="$dontknow">
</th>
</tr>
</table>
</td>
</tr>
!endif
</table>
</p>
$dhtml
!!! after the inputelements are in the DOM-tree: fill-in the previous answers
<script type="text/javascript">
try{document.onload=refill();}catch(e){}
</script>