link with two targets

G

geotso

Hi.

I supose that my problem has a javascript solution so, I kindly ask for your
help:

I want to use a link to open one of two files (*not both*) stored each one
in a different partition of my disk. For example:
When a user clicks the link in question, IE searches for the first path
(F:\Folder\file.htm) and opens the file (not procceeding with the second
path). However, if IE can't locate the first file (file or path don't
excist), then it opens the second (G:\Folder\file.html).

Can some one help me please?
 
L

Lee

geotso said:
Hi.

I supose that my problem has a javascript solution so, I kindly ask for your
help:

I want to use a link to open one of two files (*not both*) stored each one
in a different partition of my disk. For example:
When a user clicks the link in question, IE searches for the first path
(F:\Folder\file.htm) and opens the file (not procceeding with the second
path). However, if IE can't locate the first file (file or path don't
excist), then it opens the second (G:\Folder\file.html).

We need more detail:

Do you know that the user will be using Internet Explorer?
Recent security warnings have caused their market share to
drop as people switch to Firefox.

Will the targets always be on the user's local disks?

If both are true, then you can use ActiveX to look for the files,
provided the user grants permission for this security breach.

If either is not true, then client-side Javascript won't work.
 
G

geotso

Lee said:
geotso said:

We need more detail:

Do you know that the user will be using Internet Explorer?
Recent security warnings have caused their market share to
drop as people switch to Firefox.

I do use FF since v0.5. However, the project I'm working on is going to be
converted in a .chm file, so there is no need to warry.
Will the targets always be on the user's local disks?

Yes, indead. In fact, the "targets" are only one, the file
G:\Answers\Math\readme.txt, which is located in my own HD!
The problem is that that .chm file will be moved on a CD, for my little son.
Well, when he'll play the CD from WinXP environment (installed in D: with
NTFS format) the readme.txt file will be shown as located in drive G:
(correctly). However, when he'll play the CD from win98 environment
(installed in C:) the readme.txt will be shown as located in drive F:,
because win98 can't see NTFS disks!
That's why I want the one-link-for-two-targets feature.

If this make sense, then can I use javascript? (if you provide me something
of course) :)

Thanks, Lee.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top