Not that I know, at least.
But you can parse the innerHTML you get, to remove unwanted tags.
For example:
function getInnerHTML()
{
document.frmExcel.hdnHTML.value = new
String(document.body.innerHTML).replace(/<\/?tbody>/gi, ""); // this
removes all start and end tbody tags
//frmExcel is the form name, hdnHTML is name of type
}
/Robert
-----Original Message-----
From: avishkarm@y... [mailto:avishkarm@y...]
Sent: den 26 oktober 2001 13:18
To: JavaScript Objects
Subject: [javascript_objects] parsing HTML tags
I am using following function to get HTML table data in hidden type and
printing it in excel worksheet.
But for some HTML tables , it is also printing other data also.
Can I use something other that body in document.frmExcel.hdnHTML.value =
document.body.innerHTML
<Script language="javascript">
function getInnerHTML()
{
document.frmExcel.hdnHTML.value = document.body.innerHTML;
//frmExcel is the form name, hdnHTML is name of type
}
</Script>
<form method="POST" action=make_excel.asp name="frmExcel">
<input type="hidden" name="hdnHTML">
<input type="submit" value="Print in Excel" onClick ="getInnerHTML();">
</form>
Thanks in Advance.
Avishkar Meshram
ICICI Infotech,Mumbai