How can I get HTML to link to a browser (or system) specified URL?

Posted by MrHatken on Stack Overflow See other posts from Stack Overflow or by MrHatken
Published on 2010-05-31T02:01:02Z Indexed on 2010/05/31 2:12 UTC
Read the original article Hit count: 200

Filed under:
|
|
|

Hi All,

I'd like to be able to create a "HTML link" that the user can click on and be taken to an URL (location) specified either in the browser (preferences?) or system environment.

Is this possible? Any suggestions on how to do it please?

For example, it may look something like this (or alternatively it could be a clickable image or even a submit button):

"Click here to go to your preferred news site."

When the user clicks on "here" the browser would go to a location specified not in the HTML but somehow in the browser (preferences?) or some system environment variable (OS specific etc.)

Of course, the user would have to set up this preference or environment variable (or have some local application or better Web page that could set it - when approved by the user).

This is sort of like most OS these days allow you to set "preferred app" for image processing or playing media. I would like to set preferred Web sites for certain tasks.

Thanks for any suggestions. Hopefully with Javascript and modern browsers and perhaps HTML 5 something like this is possible.

Cheers, Ashley.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html