|
| |
|
|
mtfm
Posts: 426 Joined: 1/13/2006 From: Mesa, AZ Status: offline
|
alternate CSS stylesheet for IQY queries? - 7/12/2006 11:50:56
I have a big list of tabular data on my site, which some users occasionally print-- or at least they would if I could get it to print without knocking off the left two columns. I did an alternate stylesheet for printing and everything, with the alt stylesheet knocking off everything but the content-- still no go. This is on a company intraweb, so 99% of the people ever looking at this are in IE 6.0 for windows, SP2. What I'm thinking of doing now is to have the option of an IQY file, which will pull things into Excel. If I can specify an alternate stylesheet for Excel, then I can make it print the way I want it, since Excel has a little more flexibility. But I don't know if it is possible. I assume it is, since you can do an alternate stylesheet for any specific browser, as well as for printing. I just don't know how to do it. This is the javascript code I am using now for a stylesheet switcher for printing purposes. Anyone who can help, I would be greatly appreciative! <script language="javascript"> // This script allows the definition of a seperate stylesheet for printing.//
function styleSheetPicker()
{
this.ieScreen = this.iePrint = this.otherScreen = this.otherPrint = "";
}
styleSheetPicker.prototype.render = function()
{
if (document.createStyleSheet)
{
if (this.ieScreen)
document.createStyleSheet(this.ieScreen);
if (this.iePrint)
{
var ieP = document.createStyleSheet(this.iePrint);
ieP.media = "print";
}
}
else
{
var head = document.getElementsByTagName("head")[0];
if (this.otherScreen != "")
head.innerHTML += "<link rel=\"stylesheet\" href=\"" + this.otherScreen + "\">";
if (this.otherPrint != "")
head.innerHTML += "<link rel=\"stylesheet\" media=\"print\" href=\"" + this.otherPrint + "\">";
}
}
var picker = new styleSheetPicker();
// IE stylesheets
picker.ieScreen = "../intraweb/js_files_and_site_pieces/stylesheet1.css";
picker.iePrint= "../intraweb/js_files_and_site_pieces/stylesheet_for_printing.css";
picker.otherScreen = "../intraweb/js_files_and_site_pieces/stylesheet1.css";
picker.otherPrint = "../intraweb/js_files_and_site_pieces/stylesheet_for_printing.css";
picker.render();
</script>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|