The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Twitter and LinkedIn button problems
fritzbunwalla
post Jul 5 2012, 04:05 AM
Post #1





Group: Members
Posts: 4
Joined: 5-July 12
Member No.: 17,381



I am a complete newbie to HTML, I am trying to compile an EDM for work. I am dropping in the HTML code that Twitter and LinkedIn provide into the HTML builder. However, the twitter one keeps moving the text after a <script> onto the next line, which is causing the script to not work, and the LinkedIn one fails to appear when I send the newsletter to myself.

The code is as follows;

<table style="border:2px solid rgb(241, 103, 41);margin:0px auto;" border="0" cellpadding="10" cellspacing="0" width="160">
<tbody>
<tr>
<td>
<div style="text-align:center;"><a href="https://twitter.com/FIXGlobalOnline" class="twitter-follow-button" data-show-count="false">Follow @FIXGlobalOnline<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</a>
<br/><br/>
<a><script src="//platform.linkedin.com/in.js" type="text/javascript">
</script>
<script type="IN/FollowCompany" data-id="1184870" data-counter="none">
</script></a>
</div></td>
</tr>
</tbody>
</table>


Any help or thoughts greatly appreciated.

Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 5 2012, 07:41 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 13,719
Joined: 9-August 06
Member No.: 6



What if you remove the BR tags you've put after the Twitter button?


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
fritzbunwalla
post Jul 5 2012, 07:43 AM
Post #3





Group: Members
Posts: 4
Joined: 5-July 12
Member No.: 17,381



QUOTE(pandy @ Jul 5 2012, 08:41 PM) *

What if you remove the BR tags you've put after the Twitter button?


It just moves the LinkedIn button so it is nudged up right underneath the Twitter one.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 5 2012, 08:10 AM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 13,719
Joined: 9-August 06
Member No.: 6



The problem can be in the HTML the scripts write. If either of the scripts put their button in a block level element, such as a DIV, the buttons would end up under each other rather than side by side.

Can you link to a page with the buttons? They usually don't work away from the page they are meant for, so it's hard to look at them offline.


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
fritzbunwalla
post Jul 5 2012, 11:27 PM
Post #5





Group: Members
Posts: 4
Joined: 5-July 12
Member No.: 17,381



QUOTE(pandy @ Jul 5 2012, 09:10 PM) *

The problem can be in the HTML the scripts write. If either of the scripts put their button in a block level element, such as a DIV, the buttons would end up under each other rather than side by side.

Can you link to a page with the buttons? They usually don't work away from the page they are meant for, so it's hard to look at them offline.



The twitter button was generated here.

The LinkedIn one was here, although now looking at it I think I need to actually go to a different place to get the right button.

There seem to be a few people on the LinkedIn dev forum with the same issue. I am just unsure which element is going wrong, or whether it is to do with their relationship inside the HTML editor I am using to create the newsletter.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 6 2012, 09:00 AM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 13,719
Joined: 9-August 06
Member No.: 6



I meant the URL to one of your pages with the real buttons.

If it is as I suspect, maybe it works to float the buttons. Don't know. The JS is hard to untangle.


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
fritzbunwalla
post Jul 8 2012, 11:09 PM
Post #7





Group: Members
Posts: 4
Joined: 5-July 12
Member No.: 17,381



QUOTE(pandy @ Jul 6 2012, 10:00 PM) *

I meant the URL to one of your pages with the real buttons.

If it is as I suspect, maybe it works to float the buttons. Don't know. The JS is hard to untangle.


Ah, I don't actually have the buttons on a site anywhere - I am using a third-party website to compile the newsletter using a mixture of their wysiwyg editor and the html directly.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jackso
post Jul 12 2012, 05:13 AM
Post #8





Group: Members
Posts: 3
Joined: 12-July 12
Member No.: 17,424



Linked in

<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share" data-url="<% Response.Write(Server.UrlEncode(linkURL)); %>
Twitter
<a href="https://twitter.com/share?url=<% Response.Write(Server.UrlEncode(linkURL)); %>" class="twitter-share-button" data-lang="en">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th May 2013 - 05:50 PM