Recent Topics

1 Apr 17, 2008 15:55    

My b2evolution Version: 2.4.X

Hi,

I'm cleaning up the XHTML errors on my blog using the W3C's validator -- http://validator.w3.org -- and am running into a Javascript error with the code (see below) I'm using in the BAE Social Bookmark plugin.

Code:
<a href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent('$permanent_url$')+'&title='+encodeURIComponent('$title$'),'delicious', 'toolbar=no,width=700,height=400'); return false;"><img border="0" src="/plugins/socialbookmarks_plugin/delicious.gif" width="16" height="16" alt="delicious" /></a>

<a title="Stumble It" target="_blank" href="http://www.stumbleupon.com/submit?url=$permanent_url$&title=$title$"><img src="/plugins/socialbookmarks_plugin/stumbleupon.gif" width="16" height="16" border="0" alt="stumble it" /></a>

<script type="text/javascript">document.write(' <a href=http://reddit.com/submit?url='+encodeURIComponent('$permanent_url$')+'&title='+encodeURIComponent('$title$')+' target="blank" title="Reddit"><img src="/plugins/socialbookmarks_plugin/reddit.png" width="16" height="16" border="0" alt="reddit" /></a>');</script>

<script type="text/javascript">document.write(' <a href=http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url='+encodeURIComponent('$permanent_url$')+'&Title='+encodeURIComponent('$title$')+' target="blank" title="Blinklist"><img src="/plugins/socialbookmarks_plugin/blinklist.gif" width="16" height="16" border="0" alt="blinklist" /></a>');</script>

Error is that the URL's in the a href are not enclosed in quotes. For example, a href=http://reddit.com/.... should be something like a href="http://reddit.com/ ...

I'm just not sure how to correctly add in the " marks without messing up the Javascript. any and all help will be greatly appreciated.

Thanks!

RocketDude

2 Apr 25, 2008 05:14

I had the same problem.

Have you checked the AddThis.com functionality? This is what I use at our blog.

3 Apr 25, 2008 06:52

You can get rid of Javascript validation errors by commenting the code

<script type="text/javascript"><!-- YOUR CODE --></script>


Form is loading...