clivehenderson
IS-IT--Management
Hi
I use the code below for bookmarking a page and it works well
However it fails W3C validation checks on the line with opera with:
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&", which is always safe.
Can anyone suggest a change to get round this please?
[highlight #FF99FF]
<script type="text/javascript">
function bookmark_us(url, title){
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);
}
</script>
[/highlight]
Any help appreciated
Thanks
Clive
I use the code below for bookmarking a page and it works well
However it fails W3C validation checks on the line with opera with:
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&", which is always safe.
Can anyone suggest a change to get round this please?
[highlight #FF99FF]
<script type="text/javascript">
function bookmark_us(url, title){
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);
}
</script>
[/highlight]
Any help appreciated
Thanks
Clive