finstah1
12-15-2006, 02:16 PM
I have script that will display Excel data on a page if the browser is IE for Windows. I'm using the link method to show a link to the xls file for non IE Win browsers but I'm not sure how to show an iframe with a link for IE. I'm using the doc.write (which I know the syntax isn't right) but it prints out the entire iframe tag.
Is there something similar to the link method that I can use for an iframe?
Do I need the escape characters in the (Excel format) line?
<script language="javascript" type="text/javascript">
var platform=navigator.platform
var str = new String("Citigroup");
var strXL = new String("Citigroup \(Excel format\)");
if (document.compatMode && document.all && platform=="Win32")
{
str = str.link("teams/analyzer/citigroup.xls")
document.write(str)
document.write("<iframe src='teams/analyzer/citigroup.xls'width='100%' height='500'></iframe>");
}
else
{
strXL = strXL.link("teams/analyzer/citigroup.xls")
document.write(strXL)
}
</script>
Is there something similar to the link method that I can use for an iframe?
Do I need the escape characters in the (Excel format) line?
<script language="javascript" type="text/javascript">
var platform=navigator.platform
var str = new String("Citigroup");
var strXL = new String("Citigroup \(Excel format\)");
if (document.compatMode && document.all && platform=="Win32")
{
str = str.link("teams/analyzer/citigroup.xls")
document.write(str)
document.write("<iframe src='teams/analyzer/citigroup.xls'width='100%' height='500'></iframe>");
}
else
{
strXL = strXL.link("teams/analyzer/citigroup.xls")
document.write(strXL)
}
</script>