I'm currently working on a project where we have a DB2 database that contains a string of about 20,000 characters for an email template and the string contains the html we use to build the form.
Currently the old way of the project working is okay but they have requested changes and when I take the string out to make the changes and reinsert it into the table the javascript will no longer function. It will be present there but just doesn't work.
The javascript is very simple, and only creates a list of previous years so hard coding it in is a possibility, but I'd rather not retouch the database every year, and this problem has truly flummoxed me.
Any advice would be greatly appreciated.
Sorry for the edit, first time posting here.
Here is the header:
<head>
<script language="javascript">
<!--
function buildDateSelect(){
var myDate = new Date();
var year = myDate.getFullYear();
year--;
document.writeln("<option value=\"" + year + "\">" + year);
year--;
document.writeln("<option value=\"" + year + "\">" + year);
year--;
document.writeln("<option value=\"" + year + "\">" + year);
year--;
document.writeln("<option value=\"" + year + "\">" + year);
year--;
document.writeln("<option value=\"" + year + "\">" + year);
}
//-->
</script>
</head>
And here is it being called:
<b>
<fill008>
( <input type="checkbox" name="item008" value="( X ) Year End, indicate years: "/> )
Year End, indicate years:
</fill008>
</b>
<inst>
<span class="date">(Use the CTRL key to select multiple years.)</span>
</inst>
<br/>
<b>
<fill009>
<select name="item009" size="5" multiple>
<script language="javascript"><!-- buildDateSelect();//--></script></select>
</fill009>
</b>
My biggest hurdle for this is that it's all legacy code and the people who worked on it before are not in the company any more so I'm flying blind on a lot of it.
Thank you so much.