When I run page I immediatley get "Object expected" message and the tag
<body onload="setfocu s()" is highlighted.
The error occurs in this snippet from within the script file
function validatePage()
{
// select the items in the TeamDivisions listbox
var i=document.Team Maintenance.Tea mDivisions.opti ons.length -1
For (i; i>=0; i--)
{document.TeamM aintenance.hidd enTeamDivisions .value +=
document.TeamMa intenance.TeamD ivisions.option s[i].value;
document.TeamMa intenance.hidde nTeamDivisions. value += ",";}
// Now validate the page
return validatePanels( );
}
I know this because if I comment out the line "For (i; i>=0;i--)", the
functions within the script file work correctly. Obviosusly in the
above snippet the 2 lines to be executed within the For loop executes
the once but I get the expected value in the hiddenTeamDivis ions
control so at least it shows that these lines do work.
The problem is why do I get the "object expected" message when this
line is not commented out?
Thanks in anticipation
Duncan
<body onload="setfocu s()" is highlighted.
The error occurs in this snippet from within the script file
function validatePage()
{
// select the items in the TeamDivisions listbox
var i=document.Team Maintenance.Tea mDivisions.opti ons.length -1
For (i; i>=0; i--)
{document.TeamM aintenance.hidd enTeamDivisions .value +=
document.TeamMa intenance.TeamD ivisions.option s[i].value;
document.TeamMa intenance.hidde nTeamDivisions. value += ",";}
// Now validate the page
return validatePanels( );
}
I know this because if I comment out the line "For (i; i>=0;i--)", the
functions within the script file work correctly. Obviosusly in the
above snippet the 2 lines to be executed within the For loop executes
the once but I get the expected value in the hiddenTeamDivis ions
control so at least it shows that these lines do work.
The problem is why do I get the "object expected" message when this
line is not commented out?
Thanks in anticipation
Duncan
Comment