I have a form that updates the information from a table similar to this example.
I have set up the submit button to be an image, but I would like to change the image on a client side event based on a hidden filed. This is what I have so far:
Hidden Field: SQL with insert as default value and update and delete as values that are retrieved from query string.
On the SQL hidden filed I have the following on the client side event filed:
if ( $(SQL).toUpperCase() == 'INSERT')
{
document.getElementById("dnn_ctr458_View_ctr451_View_ctr448_DynamicForms_imgSave").src = "/Portals/0/SiteImages/add.gif";
}
else
{
document.getElementById('dnn_ctr458_View_ctr451_View_ctr448_DynamicForms_imgSave').src ="/Portals/0/SiteImages/Update.gif";
}
I copied the Element ID from the source code of the page containing the form but the script is not working at all.
How can I make sure I am using the correct element ID?
Is there another way that this can be done?