> ... call a custome cf tag from javascript...
> ...Press button, call tag to export to excel ...
Doing it with Javascript defeats the purpose of a custom tag.
A custom tag is your own custom Coldfusion tag, hence to be used as
a tag in a cfm or cfc page. I would instead have Javascript
open the cfm page directly, thus
<html>
<head>
<title>Opening excel page with
Javascript</title>
<script type="text/javascript">
function openIt () {
window.open("excelExport.cfm","_blank","height=300,width=500,status=yes,menubar=yes,resizable=yes,scrollbars=yes");
}
</script>
</head>
<body>
<FORM>
<BUTTON name="btn" onclick="openIt();">open
it</BUTTON>
</FORM>
</body>
</html>
excelExport.cfm
================
<cfheader name="Content-Disposition" value="attachment;
filename=testPage.xls">
<cfcontent type="application/vnd.msexcel"
file="C:\CFusionMX7\wwwroot\testPage.xls">
Here follows code that does it the custom tag way. You will
get the feel of redundancy immediately.