Connecting Tech Pros Worldwide Help | Site Map

auto-install script hangs Internet Explorer 7

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 24th, 2007, 03:25 PM
Anil
Guest
 
Posts: n/a
Default auto-install script hangs Internet Explorer 7

I want to bring to your attention the Javascript code in the article
http://java.sun.com/developer/techni...toInstall.html
It breaks in IE7.0.
The browser hangs and has to shut down.
I would appreciate any help.
thanks,
Anil

----------------------------------------------

<script language="javascript"><!---
var detect = navigator.userAgent.toLowerCase();
var windowsIE = (checkPlatform("msie") && checkPlatform("win"));
var launchTID;

var thisLocation =
location.href.substring(0,location.href.lastIndexO f('/')+1);


function launchApp() {
if (windowsIE) {
document.write("<OBJECT

CODEBASE=http://java.sun.com/update/1.5.0/jinstall-1_5_0_09-windows-i586.cab

CLASSID=clsid:5852F5ED-8BF4-11D4-A245-0080C6F74284 HEIGHT=0
WIDTH=0>");
document.write("<PARAM NAME=app VALUE=" + thisLocation +

"juwoDemos_files/juwo.jnlp>");

document.write("<PARAM NAME=back VALUE=true>");
document.write("</OBJECT>");
} else {
if (navigator.mimeTypes && navigator.mimeTypes.length) {
if (!webstartVersionCheck("1.5")) {
// Java Web Start not installed; open browser window to install site

window.open("http://jdl.sun.com/webapps/getjava/BrowserRedirect?locale=en&host=java.com",

"needdownload");
}
// Spin quietly, waiting to launch the app from the original window
launchTID = setInterval('launchJNLP(thisLocation +

"juwoDemos_files/juwo.jnlp")', 200);
}
}
}
function webstartVersionCheck(versionString) {
navigator.plugins.refresh(true);
// First, determine if Webstart is available
if (navigator.mimeTypes['application/x-java-jnlp-file']) {
// Next, check for appropriate version family
for (var i = 0; i < navigator.mimeTypes.length; ++i) {
pluginType = navigator.mimeTypes[i].type;
if (pluginType == "application/x-java-applet;version=" +
versionString) {
return true;

}
}
}
}
function launchJNLP(app) {
if (webstartVersionCheck("1.5")) {
clearInterval(launchTID);
window.location = app;
}
}

function checkPlatform(string) {
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}
--></script>


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.