Solution 1 already provides the most basic yet practical way of linking to your site: HTML
anchor.
Other ways can be implemented by JavaScript. Those ways can only be needed if you want to load your site's page on some other event rather then the anchor click (some button clicks, modifying some state of some controls, successful calculation of anything, authentication — you name it).
First of all, you can simply redirect to your page:
window.location = "http://www.YourSite.org";
window.navigate("http://www.SomeSite.org");
The object
window
reference the window object know in the context of any script on a page, the window of a current page. So, you can obtain an instance of some other window and load your resource there:
http://www.w3schools.com/jsref/obj_window.asp[
^],
http://www.w3schools.com/jsref/met_win_open.asp[
^].
Pay attention for the
open
method; it will return an instance for you. However, as this way you create a new window, pop-up blockers (a popular kind of browser plug-ins) can block it. With CSS3, you can even control the tab feature of modern browser and create a new tab. However, not all browsers implement this feature:
http://www.w3schools.com/cssref/css3_pr_target-new.asp[
^].
Besides, you can load the page and put its content to any HTML element. The most convenient way to do so would be using jQuery:
http://api.jquery.com/load[
^].
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[
^],
http://jquery.com[
^],
http://learn.jquery.com[
^],
http://learn.jquery.com/using-jquery-core[
^],
http://learn.jquery.com/about-jquery/how-jquery-works[
^] (start from here).
Remember that jQuery is designed with compatibility in mind.
—SA