 |

06-17-2005, 08:59 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Apr 2005
Location: KY USA
Posts: 761
|
|
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
|

06-18-2005, 01:53 AM
|
 |
Administrator
|
|
Join Date: Jul 2004
Location: Omaha
Posts: 2,717
|
|
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.
|

06-18-2005, 02:00 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Apr 2005
Location: KY USA
Posts: 761
|
|
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
|

06-18-2005, 02:07 AM
|
 |
Administrator
|
|
Join Date: Jul 2004
Location: Omaha
Posts: 2,717
|
|
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.
|

06-18-2005, 02:24 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Apr 2005
Location: KY USA
Posts: 761
|
|
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
|

06-18-2005, 02:27 AM
|
 |
Administrator
|
|
Join Date: Jul 2004
Location: Omaha
Posts: 2,717
|
|
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.
|

06-18-2005, 02:41 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Apr 2005
Location: KY USA
Posts: 761
|
|
Thanks, Brian!
It'll wait for rest no doubt - time for me to crash as well - 0235 am here...
__________________
W. R. Mineo
|

06-18-2005, 05:12 AM
|
|
WebProWorld Veteran
|
|
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 862
|
|
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.
|

06-18-2005, 10:02 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Apr 2005
Location: KY USA
Posts: 761
|
|
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
|

06-18-2005, 10:22 AM
|
|
WebProWorld Veteran
|
|
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 862
|
|
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.
|

06-18-2005, 12:11 PM
|
 |
Administrator
|
|
Join Date: Jul 2004
Location: Omaha
Posts: 2,717
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|