HTML Email button link not working
Asked Answered
S

1

5

I am trying to create a button in an HTML email that goes to a link in a href tag. I have practically no understanding of html code to be honest. This is what I'm trying:

<p>
  <input style="width: 200px; padding: 15px; box-shadow: 6px 6px 5px; 
    font-weight: MEDIUM; background: #3ebfac; color: #000000; 
    cursor: pointer; border-radius: 10px; border: 1px solid #D9D9D9; 
    font-size: 110%;" onclick="window.location= a href=[SURVEYURL]" 
    type="submit" value="START NOW" />
</p>

The link doesn't seem to work...

Please let me know if you can help?

Thanks.

Alex.

Susurration answered 22/10, 2015 at 11:30 Comment(2)
Code: <p><input style="width: 200px; padding: 15px; box-shadow: 6px 6px 5px; font-weight: MEDIUM; background: #3ebfac; color: #000000; cursor: pointer; border-radius: 10px; border: 1px solid #D9D9D9; font-size: 110%;" onclick="window.location= a href= [SURVEYURL]" type="submit" value="START NOW" /></p>Susurration
I just edited to include the href bit. It keeps removing the link when I put it in on the website I'm working with. Thanks for your help...Susurration
M
10

You will never get JavaScript to run in an email for obvious security reasons. Also no need to use a submit button which will attempt to submit a non-existing form.

This will work better - the anchor is allowed in emails

<p>
<a href="[SURVEYURL]" style="text-decoration:none;
    width: 200px; padding: 15px; box-shadow: 6px 6px 5px; 
    font-weight: MEDIUM; background: #3ebfac; color: #000000; 
    cursor: pointer; border-radius: 10px; border: 1px solid #D9D9D9; 
    font-size: 110%;">START NOW</a>
</p>
Mismatch answered 22/10, 2015 at 11:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.