R
RnR Ron
Hi all,
I have created a site with suppressed browser toolbars and address bars
which looks great with more real estate to work with but now need a way to
print the page besides the right mouse button click access to print page
command. I have a cross browser script (below) to created a print screen
button but it looks so generic and doesn't fit the page style at all. My
question is: How can I alter this cross browser print screen script or in
any other way display a button with either a color, a transparant
background, or a graphic background so it blends better into a page with a
graphic background? The script I have is:
Thanks very much in advance for your imput and advice,
Rock 'n' Roll Ron
<SCRIPT Language="Javascript">
function printit(){
if (window.print) {
window.print() ;
} else {
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box
WebBrowser1.outerHTML = "";
}
}
</script>
<SCRIPT Language="Javascript">
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) {
document.write('<form><input type=button value="Print Page" name="Print"
onClick="printit()"></form>');
}
</script>
I have created a site with suppressed browser toolbars and address bars
which looks great with more real estate to work with but now need a way to
print the page besides the right mouse button click access to print page
command. I have a cross browser script (below) to created a print screen
button but it looks so generic and doesn't fit the page style at all. My
question is: How can I alter this cross browser print screen script or in
any other way display a button with either a color, a transparant
background, or a graphic background so it blends better into a page with a
graphic background? The script I have is:
Thanks very much in advance for your imput and advice,
Rock 'n' Roll Ron
<SCRIPT Language="Javascript">
function printit(){
if (window.print) {
window.print() ;
} else {
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box
WebBrowser1.outerHTML = "";
}
}
</script>
<SCRIPT Language="Javascript">
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) {
document.write('<form><input type=button value="Print Page" name="Print"
onClick="printit()"></form>');
}
</script>