Closing </img> tag in form html
Posted: 28 Nov 2018
I've discovered an issue with a form I've created. It's a simple one, mostly checkboxes and date fields.
I added some javascript validation which didn't run. The console gave errors of unmatched end tags. I checked the code, all fine.
I removed my code (javascript and css), and still got the errors. It appears to be the table of form fields:
HTML1512: Unmatched end tag.
fd_Item_New.aspx (557, 719)
Which is this line:
<td class="ms-dtinput" >
<a href="#" onclick='clickDatePicker("ctl00_ctl38_g_1be77c03_50ac_4997_b4d2_ba7391ba2d04_Authorised_x0020_Car_x0020_Drive0Field_ctl00_ctl00_DateTimeField_DateTimeFieldDate", "\u002fSupportServices\u002fIMIT\u002fTestNLJ\u002f_layouts\u002f15\u002fiframe.aspx?&cal=1&lcid=2057&langid=1033&tz=-00:00:00.0007299&ww=0111110&fdow=1&fwoy=0&hj=0&swn=False&minjday=109207&maxjday=2666269&date=", "", event);return false;' ><img id="ctl00_ctl38_g_1be77c03_50ac_4997_b4d2_ba7391ba2d04_Authorised_x0020_Car_x0020_Drive0Field_ctl00_ctl00_DateTimeField_DateTimeFieldDateDatePickerImage" src="/_layouts/15/images/calendar_25.gif" border="0" alt="Select a date from the calendar."></img></a></td>
It appears that the forms designer has added code which includes a </img> tag (almost at the end of the code above) - which isn't needed.
How can I fix this error? Is it a bug?
I added some javascript validation which didn't run. The console gave errors of unmatched end tags. I checked the code, all fine.
I removed my code (javascript and css), and still got the errors. It appears to be the table of form fields:
HTML1512: Unmatched end tag.
fd_Item_New.aspx (557, 719)
Which is this line:
<td class="ms-dtinput" >
<a href="#" onclick='clickDatePicker("ctl00_ctl38_g_1be77c03_50ac_4997_b4d2_ba7391ba2d04_Authorised_x0020_Car_x0020_Drive0Field_ctl00_ctl00_DateTimeField_DateTimeFieldDate", "\u002fSupportServices\u002fIMIT\u002fTestNLJ\u002f_layouts\u002f15\u002fiframe.aspx?&cal=1&lcid=2057&langid=1033&tz=-00:00:00.0007299&ww=0111110&fdow=1&fwoy=0&hj=0&swn=False&minjday=109207&maxjday=2666269&date=", "", event);return false;' ><img id="ctl00_ctl38_g_1be77c03_50ac_4997_b4d2_ba7391ba2d04_Authorised_x0020_Car_x0020_Drive0Field_ctl00_ctl00_DateTimeField_DateTimeFieldDateDatePickerImage" src="/_layouts/15/images/calendar_25.gif" border="0" alt="Select a date from the calendar."></img></a></td>
It appears that the forms designer has added code which includes a </img> tag (almost at the end of the code above) - which isn't needed.
How can I fix this error? Is it a bug?