So, I'm working on updating 10-12 year old code to be Chrome compatable, and I've stalled out already. For whatever reason, when I input a number and then click the "fillPO" button, it doesn't update anything, and instead places a "null" into the box it should be filling. This works as intended on Internet Explorer. Is there a general rule to get this to work on chrome?
<xsl:template name="control-row">
<xsl:if test="$orderApprove='true' and $isSuperUser='false' and $archiveView='false' ">
<td nowrap="true" colspan="10">
<input type="button" name="servlet" value="Approve" onClick="return approveOrder();"> checked orders</input>
<xsl:if test="/poursxml/OrderedFields/Field='PO'">
Fill PO number across orders:
<input type="text" name="genericPO" id = "genericPO" size="15" maxlength="30"/>
<input type="button" value=" Fill PO " onclick="fillPO()"/>
</xsl:if>
</td>
</xsl:if>
</xsl:template>
This is the fillPO() in javascript.
function fillPO()
{
if(!anySelected())
alert('Please select an order first.');
else
{
dfa = document.getElementsByName('orderNumber');
len = dfa.length;
var ix = 0;
for(ix=0; ix<len; ix++)
{
if(dfa[ix].name == 'orderNumber')
{
if(dfa[ix].checked == true)
{
el_id = dfa[ix].id;
position = el_id.substring(11);
document.getElementById('PONumber' + position).innerHTML = '<input size="15" maxlength="30" type="text" name="PONumber" value="' + document.getElementById('genericPO').getAttribute('value') + '"></input>';
}
}
}
}
}