Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Please convert this code Java Script to HTML

    Hi This is chandra, I Have Java Script Code please convert that code to HTML for blogger



    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-51bd2ff861b9a073"></script>
    <script type='text/javascript'>
    var addthis_product = "blg";
    document.doAT = function(cl)
    {
    var myclass = new RegExp('hentry');
    var myTitleContainer = new RegExp('post-title');
    var myPostContent = new RegExp('post-footer');
    var elem = this.getElementsByTagName('div');

    var url;
    var title = "";

    for (var i = 0; i < elem.length; i++)
    {
    var classes = elem[i].className;
    if (myclass.test(classes))
    {
    var container = elem[i];
    url = window.location.href;

    for (var b = 0; b < container.childNodes.length; b++)
    {
    var item = container.childNodes[b].className;
    if (myTitleContainer.test(item))
    {
    var link = container.childNodes[b].getElementsByTagName('a');
    if (typeof(link[0]) != 'undefined')
    {
    var url = link[0].href;
    var title = link[0].innerHTML;
    }

    var singleq = new RegExp("'", 'g');
    var doubleq = new RegExp('"', 'g');
    title = title.replace(singleq, '&#39;', 'gi');
    title = title.replace(doubleq, '&#34;', 'gi');

    }
    if (myPostContent.test(item))
    {
    var footer = container.childNodes[b];
    }
    }
    var n = document.createElement('div');
    var at = "<div class='addthis_toolbox addthis_default_style addthis_32x32_style' addthis:title='"+title+"' addthis:url='"+encodeURI(url)+"' > <a class='addthis_button_preferred_1'></a> <a class='addthis_button_preferred_2'></a> <a class='addthis_button_preferred_3'></a> <a class='addthis_button_preferred_4'></a> <a class='addthis_button_compact'></a> <a class='addthis_counter addthis_bubble_style'></a> </div> ";
    n.innerHTML = at;
    container.insertBefore(n , footer);
    }
    }
    return true;
    };

    document.doAT('hentry');
    </script>



    After Converting this code just send it to chandrasekar0010@gmail.com

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    no. just no.


  •  

    Posting Permissions

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