I am displaying the iframe in wordpress page template. In iframe src i have pased the external site url. The Problem is that i am not able to to hide the logout link in the iframe.
I have tried the below mention code :-
frame = document.getElementById("toolkit-iframe");
frame.document.getElementById("top-nav-links").style.display='none';
OR
frame = document.getElementById("toolkit-iframe");
frame.contentDocument.getElementById("top-nav-links").style.display='none';
I have not got any success to hide the link of logout. Can anybody can help me. i will be verymuch thankfull.
There is no direct way to manipulate the content of an iframe, that’s not hosted on your domain due to security issues.
However, there is a “hacky” workaround for your problem:
Place your iframe in a container div. Div gets relative positioning. Place another div in the container and set it to absolute positioning and perhaps a positive z-index. Set width and height and position of this hiding div according to the logoutlink size and position.