Hi,
I have a small bit of code for reformatting a web page generated from another application. It basically re-builds a table, and applies a stylesheet to the new page.
Embedded in the page, it works fine, but i need it to run as a URL, within the address bar. In IE5, there was no problem with this - any ideas??
The code is (prefixed by javascript
Regards
Paul
I have a small bit of code for reformatting a web page generated from another application. It basically re-builds a table, and applies a stylesheet to the new page.
Embedded in the page, it works fine, but i need it to run as a URL, within the address bar. In IE5, there was no problem with this - any ideas??
The code is (prefixed by javascript
Code:
var i=0;
var j=1;
var cap=window.document.title;
var txt="<html><head><link rel=stylesheet href=H:/stylesheet.css></head><body><img src=H:/logo.bmp>"
+cap+
"<br><br><table cellspacing=0 cellpadding=3 border=1>";
mybody=document.getElementsByTagName("body").item(0);
mytable=mybody.getElementsByTagName("table").item(0);
txt=txt+"<tr>";
mytablebody=mytable.childNodes.item(0);
myrow=mytablebody.childNodes.item(0);
while (i<myrow.getElementsByTagName("th").length)
{mycel=myrow.getElementsByTagName("th").item(i);
myceltext=mycel.childNodes.item(0);
txt=txt+"<th>"+myceltext.data+"</th>";
i++;
}
txt=txt+"</tr>";
while(j<mytablebody.getElementsByTagName("tr").length)
{myrow=mytablebody.childNodes.item(j);
txt=txt+"<tr align=right>";
i=0;
while (i<myrow.getElementsByTagName("td").length)
{mycel=myrow.getElementsByTagName("td").item(i);
myceltext=mycel.childNodes.item(0);
txt=txt+"<td>"
+myceltext.data+"</td>";
i++;}
txt=txt+"</tr>";
j++;}
txt=txt+"</table></body></html>";
document.open();
document.write(txt);
document.close();
Regards
Paul