Code: Select all
/************************************************************************
* deleteName *
* *
* When a Delete button is clicked this function removes the *
* row from the table. *
* *
* Input: *
* $this <button type=button id='Delete....' *
************************************************************************/
function deleteName()
{
var code = this.id.substring(6); // language code
var form = this.form;
var cell = this.parentNode; // <td> containing button
var row = cell.parentNode; // <tr> containing button
var inputs = row.getElementsByTagName('input');
for(var ii = 0; ii < inputs.length; ii++)
{
child = inputs[ii];
if (child.name.substring(0,4) == 'Name')
{
child.value = '';
}
child.type = 'hidden';
}
row.removeChild(cell);
alert("CountryNamesEdit.js::deleteName: 163 " + row.outerHTML);
return false;
} // deleteName
Code: Select all
CountryNamesEdit.js::deleteName: 163 <tr id="RowGB">
<td class="center">
<input name="CodeGB" id="CodeGB" value="GB" class="actcodenc" size="2" maxlength="2" readonly="readonly" type="hidden">
</td>
<td class="left">
<input name="NameGB" id="NameGB" value="United Kingdom" class="actleftnc" size="28" maxlength="64" type="hidden">
</td>
<td class="left">
<input name="ArticleGB" id="ArticleGB" value="" class="actleftnc" size="12" maxlength="32" type="hidden">
</td>
<td class="left">
<input name="PossessiveGB" id="PossessiveGB" value="" class="actleftnc" size="12" maxlength="32" type="hidden">
</td>
</tr>
How do I set the value of that input element to an empty string in a browser portable way?