ciao

sto scrivendo una pagina con un form.
Il bottone di invio passa i dati inseriti ad una funzione in javascript che verifica che i valori siano diversi da null e anche se una checkbox é checked o no.
Il mio problema é proprio questa checkbox.
Se é checked vicino le compare un campo di testo.
Tutto funziona come dovrebbe. L'unico problema é che il valore scritto in quest'ultimo campo di testo scompare quando si procede con l'invio.

Codice:
<script type=text/javascript>
function submitICR()
{
if (validate()==true)
$('form_icr').submit();
}

function validate()
{
var check=document.getElementById('ch').value;
var allEmpty= $$("*.notEmpty[value='']");
var a = allEmpty.length;
allEmpty +=( $$("*.notEmpty:empty"));
if (check=="on")
{
document.getElementById("ch2").innerHTML = "<input type='text' name='co'> ( * )";
return false;
}
if (($$("*.notEmpty[value='']")!= '') || (allEmpty.length<a))
{
alert("The fields 'RFM Version' and 'Reason for Change' are mandatory ( * )");
return false;
}
if ((check=="on")&&(document.getElementById('co').val ue==""))
{
alert (document.getElementById('co').value);
alert ("If you checked the 'Request affecting other Interfaces' field, you have to specify which one");
return false;
}
return true;
}
<script>

<body>
<table>
<tr>
<td bgcolor="#C7C7C7">RFM Version (*): </td>
<td bgcolor="#E1E1E1" colspan="3">
<input type="text" class="notEmpty" name="icr_rfmVersion" id="icr_rfmVersion" value="<?php echo $_SESSION["rfmVersion"]; ?>" />
</td>
</tr>
<tr>
<td bgcolor="#C7C7C7">Reason for Change (*):</td>
<td colspan="3" bgcolor="#E1E1E1">
<textarea cols="40" rows="3" class="notEmpty" id="reason_rfm" name="reason_rfm" ><?php echo $rfmSubPage->values['reason']; ?></textarea>
</td>
</tr>
<tr>
<td bgcolor="#C7C7C7">Request affecting other Interfaces:</td>
<td colspan="3" bgcolor="#E1E1E1">
<input type="checkbox" id="ch" name="affectingOther_rfm" <?php echo ($rfmSubPage->values['affectingOther'] == 1 ) ? 'checked' : ''; ?> />
<span id="ch2" name="co"></span>
</td>
</tr>
</table>
</body>