Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OPen HREF with a non default application

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

Say I have a link like:
HREF="d:/temp/$SECTION/mylog.mdb target=\"_blank\""

How do I force the file mylog.mdb to be open with,say dbviewer.exe application ,and not with MS Access (default) using some JS code?

Thanks

Long live king Moshiach !
 
I don't think you can do something like this w/o using an activex control - which pops up boatloads of security warnings when ran.

If the browser gave you the power to run a specific database program (like dbviewer.exe), then what's to stop you from running a virus on their machine? I know that's probably not your intention, but that's the reason safeguards are put up to prevent what you're trying to do.

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
I'm OK to get an ActiveX message,I already get them today.
What I actualy have is my HTML file on the local machine which holds all machine's system info.
Today it already activates some BBS and JS scripts.

How do I achieve my goal in such a case ?

Long live king Moshiach !
 
Ok, if you only need it to work on your machine then you can tweak a few registry settings, and then you can bypass the activex control altogether. But remember, it will only work on your machine (or other machines with the tweaked registry settings). Here's a description from microsoft on how to make it work:


-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
Thanks.

The HTML file is not my file but a file my PErl program creates for each user on his machine.

Inside the HTML file I show links to file on the user system.Files that end with .mdb I need to be open with dbviewer.exe.
So when creating a HREF for such file inside the HTML,I need the HREF to somehow inlude "dbviewer.exe myfile.mdb" .

My guess is that it should be done with some JS code - but how ?


Long live king Moshiach !
 
I'm sorry, but my knowledge of this is extremely limited. I never use ActiveX objects because they are considered a very bad practice in javascript. Anything that pops up a security warning to your users is just asking them to never come back to your site. In order to give you the answer I'd have to go find it first, because I don't know it off the top of my head. Since you're just as able to search google as I am I'd suggest you do a little research there yourself first.

You did try google before you came and posted here, right?

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top