Facebook Like Button Code won't work in HTML Email - html

I am trying to add the like button code into a html newsletter but it won't display, only displays on the online version. Is it possible to have it display in the email newsletter as well, if so, how?

No this is not possible. The best you can do is a static like button image that takes you to your fan page or website where they can then click on a real like button. You can't embed scripts into email and have them execute, which is required to convert the like button code into the necessary rendered iframe.

An alternative to using the 'like button' is using the html only share button. Technically its not supported, but hey it works.
http://www.facebook.com/sharer.php?u=http://mylink.com

You cannot use javascript directly on emails.
But you can put a button/link to a page of your own, whose purpose is to hold the actual like button.

Related

wants that when I click on the any index hyperlink, then it is displayed on main description page

I have made an web page. There are two iframes
In it. First is of index and second one is description page. I want that when I click on the any index hyperlink, then it is displayed on main description page.
How it will be possible? please give me the HTML code
You can use a button and when clicking it, change the url of the iFrame using Javascript like this:
document.getElementById('iframe-id').src = newLink;
You can use the data-attribute to store the wanted link in your html.
In case you want to do that: It is not possible to react to things outside of an iFrame through an iFrame. So you cannot put a link in iFrame1 and have it reload iFrame2, because those are two different websites and don't see each other.
Now, idk what exactly you are planing to do, but I really hope, that you don't want to make your entire site like that. Using iFrames is really only useful for things like inserting widgets (like Codepen etc.), but should never be used to display information from your own site. If you don't want to copy your html for every site then use PHP. If you don't want to reload your entire webpage (which is pretty much never a problem) you can use AJAX-requests to load parts of your website. (Frameworks like React.js, Angular.js and Vue.js do that for you)

Show/Hide feature using HTML only

I want to create an element where it performs a show/hide functionality of text when a user clicks on a button. I've found a helpful page through this link: http://www.meadinkent.co.uk/expand_sections.htm
The only issue I have is that it uses javascript. As I want to place this into Sharepoint, what Sharepoint does is remove the <script> everytime it's submitted, so javascript I'm assuming can't be used.
I want to know if there is a way to perform the same functionality as displayed in the page but with HTML only?
Thank you
You can add js by using Embed Code web part. Just go "Insert tab" and click "Embed Code". Then edit this and you will able to use js, css, html. So, you can use your helpful link.
Embed code webpart
You can use CSS to show/hide text. You can vist the following links, which may help you.
1) https://alexcican.com/post/hide-and-show-div/
2) How to show/hide div on click with stricly HTML/CSS

How to make links open in email clients?

I'm trying to make a custom email template that is sent to a user once they fill out a form on our site. At the bottom of the email we want a button that links to a page on our website. So far I've tried using the a, button, and form tags and all of these work when you use gmail and are already in the browser but if you use outlook, the apple mail app, or any others, the button appears to click but doesn't actually do anything. Is there any sort of workaround for this? Am I just missing something simple?
Thank you so much for any help! This has been driving me crazy all day.

How to open an iframe from clicking an image

I'm wondering if anyone can help me. I'm hoping I can open an iFrame in the centre of my webpage from clicking a picture. So in effect the iframe would be hidden until the picture is clicked. I have a very small and simple upload form on another page that I would like to appear when the user needs to upload and click the picture. I've had a good look round on this site and google in general but not found what I'm looking for, or the basics weren't included because it's common knowledge for most people here. Would there also be a way of closing this when it's finished uploading too? The form currently diverts to the homepage when finished so It would be handy to have a close option as in the end (post successful upload) the iframe contents will be the same as the page it's displayed on.
The best/easiest I have come across has been on w3schools but I have read using html for iFrames is not widely accepted or it isn't the best option cross-browser.
I have been viewing and trying different code but without even the basic knowledge I can't get my head around it.
If anyone is able to help, please assume I'm 5 years old. I'm not daft but in terms of code I'm literally just starting.
Thanks in advance
You would need to add a javascript onclick function to your img tag which would open a new window upon a click. You would pass the window.open function the name of the html file you want to display. Something like this:
<img src="image.jpg" onclick="window.open('welcome.html')">

How to place code for like button when no access to code on my webpage

My websites are generated by vistaprint and facebook, so I have no access to the html. So how can I add the code which is provided to me for the Facebook like button?
After a quick google search:
On your VistaPrint dashboard, go to insert extras, click on HTML and paste in the HTML code you got from facebook.
It's on developers.facebook.com and you just need to poke around for the Like button.
EDIT:
Or just Google it. First result for facebook like button:
https://developers.facebook.com/docs/reference/plugins/like/
To customize and get code.