|
| |
|
|
lu lu
Posts: 418 From: wpg, mb Status: offline
|
Use Javascript to display - 9/25/2003 20:16:46
Is there a way to use a Javascript function to determin the text to pint in CCS? This is what I have so far, please help:
<html>
<head>
<script language="JavaScript"><!--
function text1(){
....
}
function text2(){
....
}
function text3(){
....
}
// --></script>
<head>
<style type="text/css">
#print_text1 {
display:none;
}
@media print {
#print_invisible {
display:none;
}
#print_text1 {
display:block;
}
}
#print_text2 {
display:none;
}
@media print {
#print_invisible {
display:none;
}
#print_text2 {
display:block;
}
}
#print_text3 {
display:none;
}
@media print {
#print_invisible {
display:none;
}
#print_text3 {
display:block;
}
}
</style>
</head>
<body>
<span id="href='text1.html'">
Page displayed here
</span>
</body>
|
|
|
|
lu lu
Posts: 418 From: wpg, mb Status: offline
|
RE: Use Javascript to display - 9/26/2003 13:00:37
Maybe there is another way to do this. This is my situation: I'm using a flash file that has buttons which calls another swf into the original swf on a differnet level, to display a scroller containg text. I have a printer friendly buttons in the swfs that prints external .txt files, 1 .txt file for each called swf, which is the same text that each scroller contains. I'm trying to make thing more user frienld by incorporating the IE browser print button into the senerio. Because I have an external .txt file for each piece of text in each scroller, and because I want to target each .txt file to print via the browser button, I thought maybe when a JS function is initiated from inside Flash, I could somehow use the onbeforeprint handler to select the appropiate .txt file to print. Depending on which JS function was initiated from inside the swf, the .txt file containing the same text as the swf scroller would print. So basically I trying to print the .txt file accociated with the swf scroller by using the IE browser print button, hence the onbeforeprint handler : http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onbeforeprint.asp I'll think I'll need to use CSS to print the text file and I think I'll either need to populate the CSS with the correct .txt file when the IE browser print button is fired and the JS handler initiated. Any thoughts on this??? The above code on the previous post is what i have so far. maybe i'm going about this the wrong way?
|
|
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
|
|
|