In IE7 servlet generated html loses CSS formatting
Hi.
I am generating html within my servlet and building a string containing html - a few <TD> tags with dynamic database data in them(shown below). When using firefox this generated html works perfectly and inherits the css formatting from the calling JSP page. However with IE7 the formatting is lost and the data is presented with no formatting.
Put simply firefox displays the servlet generated html using my css formatting, but IE7 does not. I tried including the stylesheet link ref in the generated html, this didn't work - any help much appreciated, code below:
String message ="<link href=\"/stylesheet/myForm.css\" rel=\"stylesheet\" type=\"text/css\"/>";
for(int i=0;i<list.size();i++)
{
myclass = (myclass) lest.get(i);
message +="<tr><th>QN</th><td>" + myclass.getMethod() +"></td>" ;
}
response.setContentType("text/html");
response.setContentLength(message.length());
PrintWriter pw = response.getWriter();
pw.write(message);
pw.close();
pw.flush();
The response is the written to div innerHTML using javascript...
var response = xmlHttp.responseText;
document.getElementById("mydiv").innerHTML = response;
document.getElementById("mydiv").style.display ="block";
Works perfectly using firefox but not with IE7, do I have to change.
Thanks a lot.
Cheers BT.

