|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Please Help!
I need to have a localized print function in my web page instead of using the one on the brwoser menu. Any one with the answer? Many many thanks in advance. |
|
#2
|
|||
|
|||
|
Try this:
<SCRIPT Language="Javascript"> function printit(){ if (NS) { 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 this Page" name="Print" onClick="printit()"></form>'); } </script> |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Localized Print Function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|