Forum Moderators: open
actually the error lies in <form> tag...especially the onsubmit portion. but i have no idea how come it says that there is an error in line 333.
may i know how do i get rid of this object expected error in order to let me run my checkForm_update(this)?
<td width="6%" align="center"> </td> -> line 333
</tr>
<tr>
<form method="post" action="update.php" onsubmit="checkForm_update(this);">
<input type=hidden name="d_id" value="116">
<input type=hidden name="id" value="9">
<input type=hidden name="keys" value="">
<td align="left"><select name="d_date1" size="3" id="d_date1">
<option value=01 >01</option>
<option value=02 >02</option>
function checkform_update(f)
{
input_box = confirm("Would you like to edit the record?");
if (input_box==true)
{
// for day - update page
if(!FcheckDropMultiple('Day',f.d_date1,1)){ return false;}//name,field,min
// for month - update page
if(!FcheckDropMultiple('Month',f.d_date2,1)){ return false;}//name,field,min
// for year - update page
if(!FcheckDropMultiple('Year',f.d_date3,1)){ return false;}//name,field,min
// for type of material - update page
if(!FcheckDropMultiple('Type of Material',f.d_material,1)){ return false;}//name,field,min
// for type of subject - update page
if(!FcheckDropMultiple('Subject',f.d_subject,1)){ return false;}//name,field,min
// for title - update page
if(!FcheckFilled('Title',f.d_title.value)){ f.d_title.focus();return false;}
// for page read from - update page
if(!FcheckNumber('Page Read From',f.d_pagefrom.value)){ f.d_pagefrom.focus();return false;}
// for page read to - update page
if(!FcheckNumber('Page Read To',f.d_pageto.value)){ f.d_pageto.focus();return false;}
// for no. of articles - update page
if(!FcheckNumber('No. of Articles',f.d_noa.value)){ f.d_noa.focus();return false;}
// for place of reading - update page
if(!FcheckDropMultiple('Place of Reading',f.d_por,1)){ return false;}//name,field,min
// for time spent - update page
if(!FcheckNumber('Time Spent',f.d_tp.value)){ f.d_tp.focus();return false;}
return true;
}
else
{ return false;}
}