Hi everyone!
I want to add an onclick event handler on a field , so that when clicked (or focus) to hide an element.
Here is my code:
function setOnFocus()
{
var preferredResource = document.getElementById("ral_preferredresource");
if (preferredResource){
alert("on click");
preferredResource.attachEvent("onclick", hideFormAssistant);
}
}
function hideFormAssistant()
{
alert("in hideformassistant");
document.getElementById('tdRelatedInformationPane').style.display = 'none';
}
Any ideas why it doesn't work? It errors on this line
preferredResource.attachEvent("onclick", hideFormAssistant);
*This post is locked for comments
I have the same question (0)