Hi ,
I am trying to do the print operation from a jsp by calling javascript : print().
so before print() got executed am trying to set page header and footer.
If i am enabling “download unassigned activex control and Initialize script Activex control” then it is working fine else its throwing javascript object error.
Am pasting the code below.
Please help me out.
<script language=”Javascript”>
var HKEY_Root, HKEY_Path, HKEY_Key;
HKEY_Root = “HKEY_CURRENT_USER”;
HKEY_Path = “
function doPrint ()
{
try
{
var Wsh = new ActiveXObject(“WScript.shell”); //here it is throwing exception
HKEY_Key = “header”;
Wsh.RegWrite (HKEY_Root + HKEY_Path + HKEY_Key, “Copyrights
HKEY_Key = “footer”;
Wsh.RegWrite (HKEY_Root + HKEY_Path + HKEY_Key, “SARANGI”);
print();
}catch (e) {
alert(“exceptoion boss———->”+e);}
}
</script>
Waiting for any earliest reply.