By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

link with two targets

P: n/a
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?

--
Merlin dying to the Lady of the Lake:
"We lived our lives with passion and devotion"
--
Please, remove the TRAP to contact me
--

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

Jul 23 '05 #2

P: n/a
Lee wrote:
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.


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.
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.

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.