Hi Guys,
as pointed by Taka a way to set text (or numeric) input boxes & textareas "readonly" is already
available in the wikidocument.getElementById("answer{SGQ}").readOnly=true;2 things:
- the code of the wiki is better because you can paste it either into the source of the question or help.
- the code I have indicated first can be easily adapted to change or add any attributes into inputs, textareas, etc…(have to be pasted into the help box)
<script charset="utf-8" type="text/javascript">
$('#answer{SGQ}').attr( "value","MyDefaultValue" );
$('#answer{SGQ}').attr( "style","background:#f55;color:#fff" );
$('#answer{SGQ}').attr( "readonly","readonly" );
</script>
Ben/