I have one problem i want add script for bookmarksite so i insert this before code HEAD:
<script type="text/javascript">
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
</script>
and after i add the comand everywhere i want in template :
<a href="javascript:bookmarksite('CrazyZone', 'http://ediboardlatervista.org')">Add to Favorites</a>
Problem is the caratter ' show me error in my template:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /membri/ediboard/Themes/default/index.template.php on line 517
i dont understand in many site work but in my site not work the CARATTER '
some solution ?
You need to escape the '
Find
<a href="javascript:bookmarksite('CrazyZone', 'http://ediboardlatervista.org')">Add to Favorites</a>
Change to
<a href="javascript:bookmarksite(\'CrazyZone\', \'http://ediboardlatervista.org\')">Add to Favorites</a>
excellent, work like a chamr now thx ;)