Web Analytics Made Easy -
StatCounter Having problems with my "add to favorites" script - CodingForum

Announcement

Collapse
No announcement yet.

Having problems with my "add to favorites" script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Having problems with my "add to favorites" script

    Hi

    I have tried some suggestions for a "make this my homepage" script but for some unknown reason they are not working

    They can be seen live on www.yodbod.com (first page)

    View with IE

    There is a bookmark / favorites link and a homepage link

    None of them work - please help if you can see the error in the source code.

    Many thanks


    Actually there is an error on the page now that wasn't there before
    The code is below:

    Code:
    <script language="JavaScript1.2" type="text/javascript"> 
    
    function CreateBookmarkLink() { 
      title = "Yodbod - Free Advertising";   // Blogger - Replace with <$BlogItemTitle$>  MovableType - Replace with <$MTEntryTitle$> 
    	url = "www.yodbod.com";  // Blogger - Replace with <$BlogItemPermalinkURL$>  
    	if (window.sidebar) {          // Mozilla Firefox Bookmark		
    	   window.sidebar.addPanel(title, url,"");	
    		 } // end if
    	else if( window.external ) { // IE Favorite		
    	   window.external.AddFavorite( url, title); 
    		 } // end if	
    	else if(window.opera && window.print) { // Opera Hotlist		
    	  return true; 
    		} // end if
    	} // end of function
    </script>
    
    <!-- Using a linked stylesheet   this is in :- index, a_run_top, a_head and  a_pic_detail -->
    <link rel="STYLESHEET" type="text/css" href="/yodbod.css">  
    
    <!--[if IE]>
    <link rel="STYLESHEET" type="text/css" href="/yodbod_ie.css">
    <![endif]-->
    
    </head>
    <body>
    <NOSCRIPT>
     <P>This site needs Javascript to work properly. PLEASE ENABLE JAVASCRIPT.
    </NOSCRIPT>
    
    <!--[if IE]>
    <div style='position:absolute; left:300px; top:440px'>
    <a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yodbod.com);">Click here to make Yodbod.com your default homepage</a>
    </div>
    <![endif]-->
    
    <script language="JavaScript1.2" type="text/javascript">	
    	if (window.external) {  
    	  document.write('<div style=\'position:absolute; left:300px; top:400px\'><a href ="javascript:CreateBookmarkLink()");">Add to Favorites</a></div>');   
    	  } 
    	else  if (window.sidebar) {  
    	  document.write('<div style=\'position:absolute; left:300px; top:400px\'><a href ="javascript:CreateBookmarkLink()");">Bookmark Page</a></div>');  
    		} 
    	else if (window.opera && window.print) {	   
    	  document.write('<a href ="javascript:CreateBookmarkLink()");">Add Bookmark</a>'); 
    		}
    </script>
    Last edited by jeddi; Oct 6, 2006, 10:36 AM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.
Working...
X