html emails - problem with <button> inside <a> tags?

The following looks fine but when i test it in gmail, it opens the link twice (in 2 new tabs), it's as if there's some kind of wierd event bubbling happening....

<a href="some_url"> <button>Approve</button> </a>

am i missing something obvious?


A link can't contain a button. Either use a button or style the link like a button (i.e. that it looks like a button).

That said: The event bubbling is probably happening because the button does it's job and then, the link processes the mouse click event, too.

The obvious thing is that this is not properly formatted [X]HTML. An <a> should not include a <button>

There are browsers that will not even allow the link to be clicked. Style the href instead

<a href="" style="text-decoration:none; border-top: 2px #cce3ff solid; border-left: 2px #cce3ff solid; border-bottom: 2px #31557f solid;border-right: 2px #31557f solid;">GO</a>

Need Your Help

Is it possible to automate MS SQL Server (2005) queries via SQL Server Management Studio?

sql sql-server-2005 scheduled-tasks

I have two queries saved on my SQL Server 2005 and I would like to have them running at certain intervals, e.g. every 24 hours. Is there a way to automate these queries and schedule them via SQL Se...

PHP: Birthday check today´s date


I have user´s birthday stored in birthday as 1999-02-26.