[SOLVED] Bookmarking JS Code!

This is a discussion on "[SOLVED] Bookmarking JS Code!" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Bookmarking JS Code! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 29th, 2007, 04:20
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 231
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Exclamation [SOLVED] Bookmarking JS Code!

Hello, I have a JS Code that I have gotten from Dynamic Drive and Instead of putting it in my main page I put it in a .js file and linked it from the Page. Anyhow It's not working correctly. So, if anyhelp can be done I will very well appreciate it! Here's the code..

This is the .js file:
Code: Select all
/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
 window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
 var elem = document.createElement('a');
 elem.setAttribute('href',url);
 elem.setAttribute('title',title);
 elem.setAttribute('rel','sidebar');
 elem.click();
} 
else if(document.all)// ie
 window.external.AddFavorite(url, title);
}
This is in my <head> tag:
Code: Select all
    <script type="text/javascript" src="includes/addtofav.js"></script>
And this bit is in the <body> section:
Code: Select all
<p style="position:absolute;right:12%;top:18%;">
<a href="javascript:bookmarksite('New Breed Jesus Freaks', 'http://www.newbreedjesusfreaks.com')">Bookmark this site!</a>
</p>
Thanks!
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote

  #2 (permalink)  
Old Sep 29th, 2007, 12:24
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Bookmarking JS Code!

Is it not working in any browser at all or just one and does it work when you drop it straight in the head of your document (rather thsn including it) ?
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
  #3 (permalink)  
Old Sep 29th, 2007, 17:03
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 18
Posts: 231
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mcdanielnc89 Send a message via Yahoo to mcdanielnc89 Send a message via Skype™ to mcdanielnc89
Re: Bookmarking JS Code!

it seems to work in ie 3,4,5 and 6, but not 7. And i think it worksin safari AND FF
Last Blog Entry: My blog? (Oct 18th, 2007)
Reply With Quote
  #4 (permalink)  
Old Sep 30th, 2007, 01:52
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Bookmarking JS Code!

I thought javascript bookmarking only worked in IE
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What have I done wrong in this code? acrikey JavaScript Forum 6 Mar 23rd, 2008 22:39
[SOLVED] Array code help longstand PHP Forum 3 Dec 1st, 2007 15:14
[SOLVED] Php code problems longstand PHP Forum 3 Oct 15th, 2007 10:53
Bookmarking Help Needed Merlin Starting Out 7 Oct 12th, 2007 07:29
New icons - Social Bookmarking! Rob Announcements and News 0 Dec 15th, 2006 22:20


All times are GMT. The time now is 19:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43