Results 1 to 2 of 2

Thread: HomePage with Java script

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    kuwait
    Posts
    11

    HomePage with Java script

    hi all
    i'm new in the programming in Java script and i'd like to know how can i make my own Home page through java script and HTML
    i don't know even how can i make Home page
    thanx for all

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Do you mean make your page the user's home page when a link is clicked? Here's how to do that (and add to the bookmarks), but it will only work in IE I think:

    Code:
    <script type="text/javascript"><!--
    function addToFavorites() {
        if (window.external) window.external.AddFavorite(document.location.href, 'Title');
      return false;
    } 
    
    /*Makes your site the user's homepage*/
    function setAsHomePage() {
      this.style.behavior='url(#default#homepage)';
      this.sethomepage(document.location.href);
      return false;
    }
    //--></script>
    <a href="#" onclick="return addToFavorites();">Bookmark</a> |
    <a href="#" onclick="return setAsHomePage();">Home Page</a>
    That will bookmark the current page. If you want to specify a particular location, change the text document.location.href in both functions to 'http://www.domain.com' (or whatever your site is).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width