Currently working on the contacts page for a website and I need the div element to disappear once an email is successfully sent. In order to hide a Div element using Javascript, I created the following function:
function hideDiv(){
document.getElementById(contact-area).style.display="none";
}
To execute the code, I added an "onclick" event to the button element:
<asp:Button ID="submitbutton" runat="server" Text="Submit" onclick="hideDiv();" />
However, I encountered a server error when attempting to load the page, specifically "Server Error Line 37:
<asp:Button ID="submitbutton" runat="server" Text="Submit" onclick="hideDiv();" />
The compile error message reads: " ) expected."
Despite researching online, I have been unable to identify the issue.