I'm trying to show/hide different page elements if the page is loaded in an iframe
<script>this.top.location !== this.location && (this.top.location = this.location);</script>
works fine to escape the iframe, but
<script>this.top.location !== this.location && (document.getElementById("toolbar").style.display="none");</script>
doesn't hide my div with the id "toolbar". What am I doing wrong? (My javascript knowledge is very limited). Many thanks.