var createdoklodop7766=null;
function Getlodop (oobject,oembed) {
/**************************
This function determines which page element to use as the Lodop object, depending on the browser type:
IE series, ie core series of browsers using Oobject,
Other browsers (Firefox series, Chrome series, Opera series, Safari series, etc.) use oembed,
If the page does not have a related object element, create a new one or use the last one, avoiding duplicate builds.
The 64-bit browser points to the 64-bit installer install_lodop64.exe.
**************************/
var strhtminstall= "<br><font color= ' #FF00FF ' > Print controls not installed! Click here <a href= ' Install_lodop32.exe ' target= ' _ Self ' > Perform installation </a>, please refresh the page or re-enter after installation. </font> ";
var strhtmupdate= "<br><font color= ' #FF00FF ' > Print controls need to be upgraded! Click here <a href= ' Install_lodop32.exe ' target= ' _ Self ' > Perform upgrade </A>, please re-enter after upgrade. </font> ";
var strhtm64_install= "<br><font color= ' #FF00FF ' > Print controls not installed! Click here <a href= ' Install_lodop64.exe ' target= ' _ Self ' > Perform installation </a>, please refresh the page or re-enter after installation. </font> ";
var strhtm64_update= "<br><font color= ' #FF00FF ' > Print controls need to be upgraded! Click here <a href= ' Install_lodop64.exe ' target= ' _ Self ' > Perform upgrade </A>, please re-enter after upgrade. </font> ";
var strhtmfirefox= "<br><br><font color= ' #FF00FF ' > (Note: If you have installed LODOP legacy attachment Npactivexplugin, in the" Tools " "Add-ons", "extensions," remove it first) </font> ";
var strhtmchrome= "<br><br><font color= ' #FF00FF ' > (if previously normal, only due to browser upgrade or reinstall problems, need to perform the above installation) </font > ";
var Lodop;
try{
===== Judging Browser type: ===============
var Isie = navigator.userAgent.indexOf (' MSIE ') >=0?true:false;
var Isie = (navigator.userAgent.indexOf (' MSIE ') >=0) | | (Navigator.userAgent.indexOf (' Trident ') >=0);
var is64ie = Isie && (navigator.userAgent.indexOf (' x64 ') >=0);
===== If the page has LODOP to use directly, no NEW: ==========
if (oobject!=undefined | | oembed!=undefined) {
if (Isie)
Lodop=oobject;
Else
lodop=oembed;
} else {
if (createdoklodop7766==null) {
Lodop=document.createelement ("Object");
Lodop.setattribute ("width", 0);
Lodop.setattribute ("height", 0);
Lodop.setattribute ("Style", "position:absolute;left:0px;top:-100px;width:0px;height:0px;");
if (Isie) lodop.setattribute ("ClassID", "clsid:2105c259-1e0c-4534-8141-a753534cb4ca");
else Lodop.setattribute ("type", "Application/x-print-lodop");
Document.documentElement.appendChild (LODOP);
Createdoklodop7766=lodop;
} else
lodop=createdoklodop7766;
};
===== determine if the LODOP plug-in has been installed, no installation or low version prompts to download the installation: ==========
if ((lodop==null) | | | (typeof (Lodop. VERSION) = = "undefined") {
Alert (LODOP. VERSION);
var content = "";
var install = "";
if (navigator.userAgent.indexOf (' Chrome ') >=0)
document.documentelement.innerhtml=strhtmchrome+document.documentelement.innerhtml;
Content = "Chrome";
if (navigator.userAgent.indexOf (' Firefox ') >=0)
document.documentelement.innerhtml=strhtmfirefox+document.documentelement.innerhtml;
Content = "Firefox";
if (Is64ie) {
document.write (Strhtm64_install);
Install = "INSTALL_LODOP64";
}
else if (Isie) {
document.write (Strhtminstall);
Install = "Install_lodop32.exe";
}else{
document.documentelement.innerhtml=strhtminstall+document.documentelement.innerhtml;
Install = "Install_lodop64.exe";
}
$ ("#win-lodop"). Window ("Refresh", "util_installlodop.action?content=" +content+ "&install=" +install). Window (" Open ");
return LODOP;
} else
if (Lodop. version< "6.1.9.8") {
var update = "";
if (Is64ie) {
document.write (strhtm64_update);
Update = "Install_lodop64.exe";
} else
if (Isie) {
document.write (strhtmupdate);
Update = "Install_lodop32.exe";
} else{
document.documentelement.innerhtml=strhtmupdate+document.documentelement.innerhtml;
Update = "Install_lodop32.exe";
}
$ ("#win-lodop"). Window ("Refresh", "util_installlodop.action?content=" +content+ "&install=" +install+ "& Update= "+update"). Window ("open");
return null;
};
===== The following blank position is suitable for calling unified functions (such as registration code, language selection, etc.): = = = =
Lodop. Set_licenses ("Investment Operations Limited", "122315445645444654", "", "");
//============================================================
return LODOP;
} catch (Err) {
if (Is64ie)
Document.documentelement.innerhtml= "Error:" +strhtm64_install+document.documentelement.innerhtml;else
Document.documentelement.innerhtml= "Error:" +strhtminstall+document.documentelement.innerhtml;
return LODOP;
};
}
This article is from the "11647004" blog, please be sure to keep this source http://11657004.blog.51cto.com/11647004/1969657
Lodop Control JS File