PDA

View Full Version : perplexing JS problem..


blaqreign
11-05-2004, 07:57 PM
I thought this would have been easy, however it's turning out to be rather tricky.

I need to launch a system checker .exe located on our website from a Flash tour. When a user clicks the button it launches the download box and they can save the .exe or run it, their choice.

On the button inside of flash i have:
sysCheck_btn.onRelease = function() {
getURL("javascript:sysChecker();");
};

In the html page i have the following function:
function sysChecker() {
window.location.href="www.mywebsite.com/_download/SysReqtsCheck.exe"
}

In the html i also have several other functions that open a new common window (named newWin) based on different web pages. Sounds like it works right?

Well when the button for the system checker appears and you click it the download dialog opens, BUT if you cancel the download none of the other functions that link to webpages work. A runtime error pops up at line 0 and the page housing the flash tour goes blank.

So, i took the js function out all together and just used a getURL on the button with a straight link to the .exe location. SAME EXACT thing (if you cancel the DL it kills the other links. To make things more bizzare i used "window.open" in the function and that would open a browser window for a split second before the download dialog opens. This works ok in W2K, however XPsp2 blocks this by default. I think it's blocked because it's an exe being called from js.

I was hoping to keep the links outside of flash so that other web developers could just change the URL in the function if needed without having to change the Flash file.

Any suggestions or ideas would be helpful.

thx

Ruben
11-06-2004, 11:16 PM
Well, try opening a popup with in it a page which does the sysChecker()-function onLoad....
Place a link (<a href>) to the exe in the popup-document as well for browsers that don't agree with such actions onLoad

:) - Ruben

PS. Wild guess, haven't tested it or anything...tell me how it worked out...