SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2002
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding FBOOK like button - error

    Here's the javascript below that i got working but it doesn't interpret the url properly... Fbook gives error...
    The page at http://www.myurl.com/></IFRA...amp;gt;< could not be reached.
    it doesn't recognize the end of url value.... how do i put a single quote in?

    <script LANGUAGE="JavaScript">

    <!--
    document.write('<A HREF="' + location.href +'">');
    document.write(location.href);
    document.write('</A>');
    document.write('<IFRAME scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:210px; height:200px;" allowTransparency="true" src="http://www.facebook.com/plugins/like.php?href=');
    document.write(location.href);
    document.write('></IFRAME>');
    // -->
    </SCRIPT>

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Location
    Kingdom of Saudi Arabia
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <script language="JavaScript">
    	<!--
    	document.write('<a href="'+ location.href +'">');
    	document.write(location.href);
    	document.write('</a>');
    	document.write('<iframe scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:210px; height:200px;" allowTransparency="true" src="http://www.facebook.com/plugins/like.php?href="'+location.href);
    	document.write('></iframe>');
    	// -->
    </script>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •