anAppBuilder
asked on
How do I put an href button to open a site in an email without using javascript?
Putting a line like
<a href='www.somesite.com' target='blank'>
in an HTML email will let the recipient click on the link to open the site in a new browser
.
Is there a way to do this with a button, rather than the link, without using javasrcript?
Also, is there a way to specify a new tab, rather than a new browser (without using javacript)?
<a href='www.somesite.com' target='blank'>
in an HTML email will let the recipient click on the link to open the site in a new browser
.
Is there a way to do this with a button, rather than the link, without using javasrcript?
Also, is there a way to specify a new tab, rather than a new browser (without using javacript)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, focusmultimedia. I tried the first one and it works except that the button is hanging down below the text in onther s in the same . I tried adding valign='top' to the button, but that doesn't help. Any ideas?
<div style="vertical-align:top">
<form name="form1" method="post" action="http://www.examplexkxkxkxkxk11.com" target="_blank"><input type="submit" name="Submit" value="Click me"></form>
</div>
ASKER
That didn't work either. Let me do a few experiments then if it's stil not working I'll post a snippet.
ASKER
Well I can't seem to make it align with the text. Here's my php snippet .
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<?php
$site = "http://www.google.com";
$test = "<table><tr>
<td align='left'>Some text</td>
<td align='left'> Some more text </td>
<td >
<div style='vertical-align:top'>
<form name='form1' method='get' action='$site' target='_blank'>
<input type='submit' name='submit' value='Click Me'>
</form>
</div>
</td>
</tr></table>";
print $test;
?>
ASKER
and the page source
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<table><tr>
<td align='left'>Some text</td>
<td align='left'> Some more text </td>
<td >
<div style='vertical-align:top'>
<form name='form1' method='get' action='http://www.google.com' target='_blank'>
<input type='submit' name='submit' value='Click Me'>
</form>
</div>
</td>
</tr></table>
ASKER
The vertical positioning of the button is really a separate problem, so I'm going to close this question with thanks to focusmultimedia. I've opened a separate question for the vertical positioning problem.
ASKER
Thanks!
ASKER
Thank you, devarioj for the vertical positiong suggestion. PHope you'll give further suggestions for points in answer to the separate question I posted.
link me to your other question
ASKER
Here's the link, but the question has already been answered. Thanks anyway.
https://www.experts-exchange.com/questions/23567106/How-do-I-get-an-href-button-to-vertically-align-with-text-in-the-same-tr.html
https://www.experts-exchange.com/questions/23567106/How-do-I-get-an-href-button-to-vertically-align-with-text-in-the-same-tr.html
<form name="form1" method="post" action="http://www.examplexkxkxkxkxk11.com" target="_blank"><input type="submit" name="Submit" value="Click me"></form>
or
-- With the 2nd example, ensure the image has been uploaded to a public webspace and thaty you're not using a local file.