How to hide URL link on hover in Outlook - javascript

I've made a email template in HTML for Outlook and it includes a button, when the user clicks the button it navigates to a website. I'm trying to hide the URL link when the user hovers over it.
When I test the template using Google Chrome the URL doesn't appear and when you click on the button it goes to the website but when I send the template in Outlook, you can't see the link when you hover over it but when I click on the button it doesn't go to the website.
I'm fairly new at this, so was wondering it anyone could help. The code I'm currently using is:
<a onclick="location.href='IP Address'">Click here</a>

This is impossible (thankfully, since support for this would be a great boon to phishers).
Email clients that accept HTML formatted mail do not accept JavaScript.

Related

How to disable right click mouse options on Hyper text in an email when we open it in outlook

Just want disable right click mouse options on
Hyper text in an generated email body when we open it in outlook using java script/Jquery.
Some how the below snippet is working when we open the email in the browser but the same is not working when we open in the PC's outlook. Please help on this.
How to prevent Right Click option using jquery
Please correct me incase the query is invalid.
Email clients restrict any JavaScript code in the message bodies for security reasons. So, Outlook ignores any scripts in the message body as well.

simulating .click() for non http urls

I have taken up a rather ambitious task.
Scenario:
A user gets a sms on his mobile. The sms is basically an alert. I want the user to be able to share the message to his whatsapp contacts by clicking on a link rather that he copying the messaging, opening whatsapp, selecting a contact, pasting the message and clicking on send.
If a website has html tag written in the following way:
<a id="blood-request-sms" href="whatsapp://send?text=Hello%20World!">
B+ required by 21st March at Hyderabad
</a>
and the user clicks on the link on a mobile browser, whatsapp opens and allows the user to select the contact / group and sends the message (Hello World! in this case)
Since I don't want the user to click more than once till he opens whatsapp to select the contact/group I thought of a design like this:
a) The user gets a sms with a url like goo.gl/qpdRdr
b) This opens a page for which I have written the following code on load of the page
document.getElementById('blood-request-sms').click();
This ideally simulates the click on the a element and should open whatsapp.
This working for any href of http protocol but for whatsapp, this is not happening.
Any way I can get this working??
Thanks,
Lakshman.
Your provided example does actually work on my device (iPhone with iOS 9).
Maybe you could also try to skip the aaltogether and just assign a new location.href:
<a id="blood-request-sms" href="whatsapp://send?text=Hello%20World!">
B+ required by 21st March at Hyderabad
</a>
<script>
location.href = "whatsapp://send?text=Hello%20World!";
</script>

How to implement a social button based on its URL

It seems that social buttons (Facebook,Google,Twitter) usually are put in an iframe. It seems I can isolate the social button by following the iframe source URL, for example a tweet button:
Follow this URL to see the tweet button
My question is: How do I put this button on my page? The reason I want it out of the Iframe is because I would like to click on it programmatically eg Jquery/javascript.
This is not possible by design, and besides that against the TOS of these services. You cannot post on an arbitrary user's facebook or twitter without their approval.

Facebook share with custom text on button

It used to be done this way:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<a type="button_count" share_url="http://google.pl" name="fb_share">Share this page on Your's wall</a>
And it used to generate a share button with text "Share this page on Your's wall" instead normal "Share". Since last update it doesnt work anymore.
Is there any posibillity to change the text on share button?
With Facebook JS SDK:
You now have to use the Feed Dialog, which is part of the Facebook JavaScript SDK.
Without Facebook JS SDK:
If you don't want to be bothered with their SDK, you can use this simple link instead:
Share this page on your wall
Here's what it'll look like if you're sharing Google.com with this link:
https://www.facebook.com/dialog/feed?app_id=140586622674265&link=http%3A%2F%2Fgoogle.com&name=Google&redirect_uri=http%3A%2F%2Fs7.addthis.com%2Fstatic%2Fpostshare%2Fc00.html
Also, please acknowledge these three things:
You need to replace [[URL]] and [[TITLE]] with a link to the page you want to share and its title (both url-encoded).
The Feed Dialog has to show from which Facebook app the post comes from. The app_id parameter in the URL above is the one from AddThis. Create a Facebook app and put its own id in the URL to use the name you want instead of "AddThis Sharing". You can keep the app_id from AddThis though, it works just fine.
The last parameter (redirect_uri) is the page where the user will be redirected after sharing. It's currently a page from AddThis with some JavaScript that will close the tab / window. That way, the dialog just disappears when it's not needed anymore. You don't have to change it either, works great.

How to check if a webpage is loaded or not in the browser window,when redirecting from a different website?

My requirement is that I have a few hyperlinks on a webpage and when the user clicks on these hyperlinks I should redirect the user to an asp.net web page(Default.aspx) in a different website.
For the 1st time when the user clicks on one of the hyperlinks it will launch a new browser window with the Default.aspx loaded and then if the user clicks on some other hyperlink I want to redirect the user to the existing browser window(in which deafult.aspx is already loaded)with the content related to this particular hyperlink loaded,instead of launching a new browser window/tab.
But I am not sure of how to achieve this.I wonder if I can add some js to the asp.net Default.aspx page to achieve this.
Please could someone put me in the right direction?
Thanks
It sounds like the target property of the <a> tag will serve your purposes. Try:
Link 1
Link 2
Any clicks on the link subsequent to the first one should not result in additional windows.

Categories

Resources