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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to jump to home page?

Status
Not open for further replies.

ringd

Programmer
Jul 11, 2000
35
GB
Hello!

How can I direct the browser to the user's home page (e.g when 'myhome' button is clicked on the page)?

Cheers,
Dave.
mailto:dave.ring@barclays.co.uk
 
For IE: window.location = 'about:home';
For Netscape: window.home();
 
Hello!

Not sure how to implement the above response. The line I am trying to add the functionality looks like...

Code:
<a href=&quot;?&quot; target=&quot;_top&quot; class=&quot;font99&quot; >Log out</a>

Anyone have any suggestions on how this can be achieved?

Cheers,
Dave.
mailto:dave.ring@barclays.co.uk
 
here you go:

Code:
<script language=&quot;javascript&quot;>
  if (document.all) {
    //IE
    document.write('<a href=&quot;about:home&quot; target=&quot;_top&quot; class=&quot;font99&quot; >Log out</a>');
  } else {
    // Netscape
    document.write('<a href=&quot;#&quot; onclick=&quot;top.home()&quot; class=&quot;font99&quot; >Log out</a>');
  }
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top