I've defined a javascript function:
<script>
function expand()
{
parent.getElementById("elementA").style.height = 300px;
}
</script>
I'm trying to call it onClick:
<div id="elementB" onclick="expand()">Notif</div>
The web console tells me that expand is not defined when I click on it.
thisto your function call in the dom.expand(this). this will pass a reference to the dom element that the event is attached to. just an fyi