Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-17-2005, 08:59 PM
wrmineo's Avatar
WebProWorld Veteran
 

Join Date: Apr 2005
Location: KY USA
Posts: 761
wrmineo RepRank 0
Default Valid Code for Bookmark Script

Okay, I need help, please ...

I want to be able to add a valid bookmark code/script to some of my pages. The html validates at W3C, but when I run "link check" I get the following error message from W3C:

Quote:
Originally Posted by W3C
javascript:window.external.AddFavorite('http://www.freshdames.com/index.html',%20'Female%20Celebrity%20Pictures')
What to do: You must change this link: people using a browser without JavaScript support will not be able to follow this link. See the Web Content Accessibility Guidelines on the use of scripting on the Web and the techniques on how to solve this.

Response status code: 501
Response message: Protocol scheme 'javascript' is not supported
Line: 201
Any ideas and help would be greatly appreciated - thanks in advance!

w®m
__________________
W. R. Mineo
Reply With Quote
  #2 (permalink)  
Old 06-18-2005, 01:53 AM
brian.mark's Avatar
Administrator
 

Join Date: Jul 2004
Location: Omaha
Posts: 2,717
brian.mark RepRank 2brian.mark RepRank 2
Default Well...

Without JavaScript, I don't believe it is possible to have a link add a bookmark. You can tell people to press the hotkey instead, but it's not really as useful.

Some errors are meant to be ignored.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #3 (permalink)  
Old 06-18-2005, 02:00 AM
wrmineo's Avatar
WebProWorld Veteran
 

Join Date: Apr 2005
Location: KY USA
Posts: 761
wrmineo RepRank 0
Default

W3C states there's a solution, but I may as well be trying to decipher the Dead Sea Scrolls or pryamid pictures to be honest ... http://www.w3.org/TR/WCAG10-HTML-TEC...ssible-scripts
__________________
W. R. Mineo
Reply With Quote
  #4 (permalink)  
Old 06-18-2005, 02:07 AM
brian.mark's Avatar
Administrator
 

Join Date: Jul 2004
Location: Omaha
Posts: 2,717
brian.mark RepRank 2brian.mark RepRank 2
Default Indeed.

Yeah... what they said.

Code:
<script language="JavaScript">
<!--
javascript:window.external.AddFavorite('http://www.freshdames.com/index.html',%20'Female%20Celebrity%20Pictures');
//-->
</script>
<noscript>
Press CTRL+D to bookmark this page now.
</noscript>
That's what I got out of this.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #5 (permalink)  
Old 06-18-2005, 02:24 AM
wrmineo's Avatar
WebProWorld Veteran
 

Join Date: Apr 2005
Location: KY USA
Posts: 761
wrmineo RepRank 0
Default

Okay, now I'm stumped .... with that code:

The html is valid and it pass W3C link check -

However:

When the page first loads, it automatically pops up the favorites window (maybe not a bad thing, but also a real turn off for many I'd think).

and

The Bookmark Us is not present at the bottom as it was ...

Are you messing with the blonde again, Brian; be nice :)
__________________
W. R. Mineo
Reply With Quote
  #6 (permalink)  
Old 06-18-2005, 02:27 AM
brian.mark's Avatar
Administrator
 

Join Date: Jul 2004
Location: Omaha
Posts: 2,717
brian.mark RepRank 2brian.mark RepRank 2
Default Oops...

I forgot that your code would need to be in a click event. Sorry. I'll think about it again in the morning when I'm not so sleepy.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
  #7 (permalink)  
Old 06-18-2005, 02:41 AM
wrmineo's Avatar
WebProWorld Veteran
 

Join Date: Apr 2005
Location: KY USA
Posts: 761
wrmineo RepRank 0
Default

Thanks, Brian!

It'll wait for rest no doubt - time for me to crash as well - 0235 am here...
__________________
W. R. Mineo
Reply With Quote
  #8 (permalink)  
Old 06-18-2005, 05:12 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 862
speed RepRank 1
Default

Code:
<script language="JavaScript" type="text/javascript"><!--
    function addToFav() {
        window.external.AddFavorite('http://www.tolranet.co.uk', 'Web Development');
    }
        
    if(window.external)
        document.write('<a href="javascript:addToFav()">Bookmark this page now<\/a>.');
    else
        document.write('

Press CTRL+D to bookmark this page now.<\/p>');
// --></script>
<noscript>
    

Press CTRL+D to bookmark this page now.</p>
</noscript>
That is click driven and also shows CTRL+D message for Firefox etc which don't support AddFavorite method.
__________________
US & UK Web Hosting with hourly backups | Hosting Affiliate Scheme | Web Directory 2 for 1 Offer
Reply With Quote
  #9 (permalink)  
Old 06-18-2005, 10:02 AM
wrmineo's Avatar
WebProWorld Veteran
 

Join Date: Apr 2005
Location: KY USA
Posts: 761
wrmineo RepRank 0
Default speed to the Rescue ... Again!

SWEET! Thanks, speed!

Works without a hitch. Passes W3C validation AND Link Checker!

Are you listed at Heres1? If not, please feel free - also, please post some of your awesome knowledge!

THANKS again.

Oh, one final question - will this work with my link ref for favico or will I need to add into this script somehow?

A very happy and impressed guy,
Rob
w®m
__________________
W. R. Mineo
Reply With Quote
  #10 (permalink)  
Old 06-18-2005, 10:22 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 862
speed RepRank 1
Default

Quote:
will this work with my link ref for favico or will I need to add into this script somehow?
The favicon link is independent of this code, or anything else on the page.

So assuming the browsers are currently showing the favicon then they will continue to show it.
Quote:
Are you listed at Heres1?
I don't think so but I'll check out the link later thanks.
__________________
US & UK Web Hosting with hourly backups | Hosting Affiliate Scheme | Web Directory 2 for 1 Offer
Reply With Quote
  #11 (permalink)  
Old 06-18-2005, 12:11 PM
brian.mark's Avatar
Administrator
 

Join Date: Jul 2004
Location: Omaha
Posts: 2,717
brian.mark RepRank 2brian.mark RepRank 2
Default Thanks...

That's what I was thinking of doing, but after a day of CWS action, I wasn't thinking enough to put that all together.

Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0