va*********@gmail.com a écrit :
Hi guys,
I wrote a greasemonkey to directly post bookmarks to del.icio.us and my
script shows an icon on the page. upon clicking it, it will create an
iframe and allow us to post the bookmark. The problem is my icon is
showing up even in iframes, I just want to show the parent window only.
Which parent window ?
This where is the icon-image-button ?
How can I detect a page whether its served in iframe or parent window ?
Isn't it to you to decide where you send your pages ?
location = 'page.htm';
self.location = 'page.htm';
parent.location = 'page.htm';
top.location = 'page.htm';
parent.myIframe.location = 'page.htm';
<img name="iconnette" src="icon.jpg" onclick=" ... >
<iframe name="myIframe" onload="deletIcon()" ... ></iframe>
function deletIcon() {
var Ic = parent.myIframe.document.iconnette;
if(Ic) Ic.style.display = 'none';
}
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date