N
Neil
Hi,
I'm getting the fololowing error in Mozilla and Netscape, which does not
occur in IE.
'form1 is not defined' at line 195
line 195 is the third line below:
function UpdateTagValues()
{
for (iIndex=0; iIndex<=form1.cboValue.length+1; iIndex++)
{
form1.cboValue.options[0] = null;
}
for (iIndex=0; iIndex<=iTagID.length; iIndex++)
{
if (iTagTypeID[iIndex] == form1.cboType.value)
{
var option = new Option(sTagValue[iIndex], iTagID[iIndex]);
form1.cboValue.options[form1.cboValue.length] = option;
}
}
}and the data refered to is (part):var iTagID = new Array();
var iTagTypeID = new Array();
var sTagValue = new Array();
iTagID[0] = 7;
iTagTypeID[0] = 3;
sTagValue[0] = 'Christmas Card';
iTagID[1] = 8;
iTagTypeID[1] = 3;
sTagValue[1] = 'Test - can be deleted';
iTagID[2] = 9;
iTagTypeID[2] = 5;
sTagValue[2] = 'Chief Executives/Directors';form1 is defined:<form
name="form1" id="form1" method="post" action="">etc...and finally, the
calling element is:<select name="cboType" id="cboType"
onchange="UpdateTagValues();">etc...Any advice appreciated.regards,NEIL
I'm getting the fololowing error in Mozilla and Netscape, which does not
occur in IE.
'form1 is not defined' at line 195
line 195 is the third line below:
function UpdateTagValues()
{
for (iIndex=0; iIndex<=form1.cboValue.length+1; iIndex++)
{
form1.cboValue.options[0] = null;
}
for (iIndex=0; iIndex<=iTagID.length; iIndex++)
{
if (iTagTypeID[iIndex] == form1.cboType.value)
{
var option = new Option(sTagValue[iIndex], iTagID[iIndex]);
form1.cboValue.options[form1.cboValue.length] = option;
}
}
}and the data refered to is (part):var iTagID = new Array();
var iTagTypeID = new Array();
var sTagValue = new Array();
iTagID[0] = 7;
iTagTypeID[0] = 3;
sTagValue[0] = 'Christmas Card';
iTagID[1] = 8;
iTagTypeID[1] = 3;
sTagValue[1] = 'Test - can be deleted';
iTagID[2] = 9;
iTagTypeID[2] = 5;
sTagValue[2] = 'Chief Executives/Directors';form1 is defined:<form
name="form1" id="form1" method="post" action="">etc...and finally, the
calling element is:<select name="cboType" id="cboType"
onchange="UpdateTagValues();">etc...Any advice appreciated.regards,NEIL