Recently, while setting up the code for my email and styling it with HTML/CSS, someone suggested adding a button to show or hide a table in the email body to make the content more organized. However, this poses a challenge as most mail clients do not support JavaScript, jQuery, or other coding languages typically used for interactive elements on web pages.
So, my question is, is it possible to create a functional button in an email that can toggle the visibility of a specific table in the email body? If so, how would I go about implementing this?
Below is a snippet of the code I have for my email:
sBody="<font face=""Verdana, Arial"" size=2 color=""black"">Dear " & FirstName & ",<br><br>"
sBody=sBody & "Recently you made a ticket concerning '<b>" & FormSubject & "</b>'.<br>"
sBody=sBody & "We will try to answer your question as quick as possible." & "<br><br>"
sBody=sBody & "<br>"
sBody=sBody & "<table cellspacing=""0"" cellpadding=""0""><tr>"
sBody=sBody & "<td align=""center"" width=""200"" height=""35"" bgcolor=""#000091"" style=""-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; color: #ffffff; display: block;"">"
sBody=sBody & "<a href=""http://www.EXAMPLE.com/"" style=""font-size:16px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none; line-height:40px; width:100%; display:inline-block""><span style=""color: #FFFFFF"">Show ticket information</span></a>"
sBody=sBody & "</td></tr> </table>"
sBody=sBody & "<table id=""tickethide"" style=""display: none;"">"
sBody=sBody & "<tr><th style=""border: 1px solid black;""><font face=""Verdana, Arial"" size=2 color=""#000080"">Send date</th><th style=""border: 1px solid black;""><font face=""Verdana, Arial"" size=2 color=""#000080"">For department</th><th style=""border: 1px solid black;""><font face=""Verdana, Arial"" size=2 color=""#000080"">Type of ticket</th><th style=""border: 1px solid black;""><font face=""Verdana, Arial"" size=2 color=""#000080"">Subject</th><th style=""border: 1px solid black;""><font face=""Verdana, Arial"" size=2 color=""#000080"">Ticket description</th></tr>"
sBody=sBody & "<tr bgcolor=""#BEC0F7"">"
Not all the code for the email body is included here to avoid overwhelming the reader with unnecessary information. Additionally, please note that I am using classic ASP for programming and setting up this email, which explains the use of "&" and double quotation marks. The current button implementation uses an href tag, but this will be removed once the show/hide functionality is added.