|
-
Aug 25th, 2004, 12:05 AM
#1
Thread Starter
Lively Member
Urgently need help in javascript try...catch
Dear Gurus and members,
I am a javascript and programming newbie. How can I use javascript try ... catch to check for the existance of an exe file on user's computer? The basic idea of the script is as below:
Code:
function loadRecorder() {
try
(
//load exe file located on user's computer, fixed path
location.href = "file:///C:/Program Files/IEBAudioRecorder/AudioRecorder.exe";
}
catch
{
//display a message saying the program does not exist in user's computer
//request user to download from the server
location.href = "http://server:00/library/IEBAudioRecorder.exe";
}
}
I don't know what var should I add after catch( ) and have no idea whether will this method work. I really appreciate if someone could complete the script above and guide me, if the script above doesn't work. Looking forward to some reply soon.
Thanks in advance,
Janice
Last edited by janice_2k; Aug 25th, 2004 at 12:15 AM.
-
Aug 30th, 2004, 08:04 PM
#2
Frenzied Member
javascript cannot do this due to security issues, and thats a good thing.
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|