Connecting Tech Pros Worldwide Help | Site Map

IFrame problem.

  #1  
Old November 17th, 2006, 11:55 AM
vamsee.2005@gmail.com
Guest
 
Posts: n/a
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.

How can I detect a page whether its served in iframe or parent window ?

  #2  
Old November 17th, 2006, 01:35 PM
ASM
Guest
 
Posts: n/a

re: IFrame problem.


vamsee.2005@gmail.com a écrit :
Quote:
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 ?
Quote:
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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic IFRAME problem shlomi.schwartz@gmail.com answers 26 February 21st, 2006 09:05 PM
iframe problem seans answers 6 November 17th, 2005 08:11 AM
iframe problem cakewalkr7 answers 9 July 24th, 2005 01:41 AM
iframe problem - null object error when changing url Jim Marquardson answers 5 July 23rd, 2005 01:15 PM
ONLOAD is there an afterLoad alternative (Iframe problem) Rich answers 2 July 23rd, 2005 11:26 AM