I'm working with an old classic ASP page that generates an HTML table through SQL. Currently, after the table is generated, the user clicks on a button that redirects the user to another page and re-runs the SQL to generate a new table, but this new page's content type set to Excel format.
I would like to eliminate this overhead and instead pass an HTML table to the next page based on the table's ID.
I know that I can find the object through JavaScript's document.getElementById('IdHere');
but how can I pass that variable through to the next page?
The following is the current form structure:
<form method="post" name="xlsexport" target="_blank"
action="payment_analysis_xls.asp?<%=Request.QueryString%>&filename=paymentAnalysis.xls">
<a href="javascript:void(0);" onclick="javascript:document.xlsexport.submit();">Export to Excel</a>
<input type="image" src="xls.gif"/>
<input type="hidden" name="report" value="analysis"/></form>
I assume I'll have to change the form's onClick event to a function that I create, that will grab the table by ID. But how can I proceed from there?
Thank you!