Add this (javascript)

User 256674 Photo


Registered User
19 posts

I am trying to add the Add This javascript code, so that surfers can link a product page to twitter, facebook etc......

I can insert the code supplied by Add this, using the html insert tool.

It works just fine, BUT

The product specifics such as price, qty, add to cart button are pushed right to the bottom of the page.

Is there a way to stop this inserted code from pushing those things to the bottom of the page?

PS

Here is the code supplied by Add this

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=chrisparry" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<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>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=chrisparry"></script>
<!-- AddThis Button END -->
User 364143 Photo


Guest
5,410 posts

I thought the cart did not support inserting script using the html tool?
CoffeeCup... Yeah, they are the best!
User 256674 Photo


Registered User
19 posts

TheAdd This badge is displayed just fine, but it does create half a page of blank, before the product details (qty, price, add to cart) is displayed.

Outside of my knowledge base as to why this half page of blank is being generated

Need help from clever people.........
User 364143 Photo


Guest
5,410 posts

It is hard to say since nobody can see the code. Try putting the scripts inside a div.
CoffeeCup... Yeah, they are the best!
User 94707 Photo


Registered User
41 posts

For what it's worth I have an Add This button and it seems to work fine. I inserted it as HTML code.

It's here - http://www.alabasterchesssets.com/shop/viewitem.php?productid=891
User 256674 Photo


Registered User
19 posts

Hi Jerry

Thank you for that. Still can't get it to work like yours !!!

Would you mind sharing the html segment pasted into your "description box"

There is obviously something that I am missing and I can't see it from looking at your source code.

Many thanks in advance

Chris
User 94707 Photo


Registered User
41 posts

Chris,

Here it is. Hopefully there's something in here that can help you. A lot of the code is irrelevant (like CSS tags) but I kept it as is. I've noted where the ADD ITEM code begins and ends.

Good luck!



<style>
#product_detail h3, p { font-family:cursive; }#product_detail h3 { font-size:large;}
#product_detail table { border-color: #000000; border-width: 0 0 2px 2px; border-style: solid; border-collapse:collapse;}
#product_detail td { border-style:solid; border-color: #000000; border-width: 2px 2px 0 0; background-color:#00CCFF; margin: 0px;}
#product_detail td.left { width:120px; font-family:cursive; font-size:small; font-weight:bold; text-align:right; padding-right:20px;}
#product_detail td.right { font-family:cursive; font-size:small; text-align:left; padding-left:20px; padding-right:20px; }
#product_detail img {margin-right: 15px; }
</style>
<!--- ADD ITEM CODE STARTS HERE ------>
<a class='a2a_dd' href='http://www.addtoany.com/share_save'><img src='http://static.addtoany.com/buttons/share_save_171_16.png' width='171' height='16' border='0' alt='Share/Bookmark'/></a>
<script type='text/javascript'>a2a_linkname=document.title;a2a_linkurl=location.href;</script><script type='text/javascript' src='http://static.addtoany.com/menu/page.js'></script>
<!--- ADD ITEM CODE ENDS HERE ------->
<div id='upper_block'></div>
<div id='product_detail'>
<p>Attractive marble chess set. An great addition to any library study or family room. Black and Tan squares and pieces with a Black Frame. Other attributes - Board dimensions: 16&quot; x 16&quot; x 3/4&quot;, Weight: 17 lbs, King Height: 3 1/2&quot;, King Base: 1 1/8&quot;</p>
<p class='sku'>WWI 96016BT</p><br>
<h3>Specifications</h3>
<table><tbody>
<tr><td class='left'>King Height</td><td class='right'>3 1/2&quot;</td></tr>
<tr><td class="left">King Base</td><td class="right">1 1/4&quot;</td></tr>
<tr><td class="left">Square Size</td><td class="right">1 3/4&quot;</td></tr>
<tr><td class="left">Length</td><td class="right">16&quot;</td></tr>
<tr><td class="left">Width</td><td class="right">16&quot;</td></tr>
<tr><td class="left">Height</td><td class="right">3/4&quot;</td></tr>
<tr><td class="left">Weight</td><td class="right">19 lb</td></tr><tr>
<td class="left">Manufacturer</td><td class="right">WW Chess</td></tr>
<tr><td class="left">Country of Origin</td><td class="right">China</td></tr>
</tbody></table><br>
<div id='lower_block'></div><br>
<div id='product_footer'></div></div>
<script defer='defer' type='text/javascript' src=''></script>
User 256674 Photo


Registered User
19 posts

Thanks for your code.

It seems the add this code is different to your add any code and as such I can't get it to work.

I did however find some slightly different code for add this, which does seem to work!!!

Still working on it though.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.