Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Hiding Images


Message #1 by "Andrew Palmer" <palmer@a...> on Tue, 20 Nov 2001 23:36:08
--0-463999352-1006439965=:98545
Content-Type: text/plain; charset=us-ascii


 I think thare are restrictions to modify the content of a document opened in a frame. Anyway, you can access the content for
reading. And I guess you can make some operations (and what you want it would be possible). Try this code:
window.top.frames('youframe').document.all('yourimage').style.display = "none"; 
OR
window.top.frames('youframe').document.all('yourimage').style.visibility = "hidden"; 

where yourframe is the frame you want to access and yourimage is the image you want to hide.

Hope it works, good luck!

  "Nyman, Robert" <Robert.Nyman@i...> wrote: Sorry Andrew,

security restrictions in JavaScript doesn't allow you to alter the content
of other web sites in a frame...


/Robert



-----Original Message-----
From: Andrew Palmer [mailto:palmer@a...] 
Sent: den 21 november 2001 00:36
To: javascript
Subject: [javascript] Hiding Images


If I have a frameset and within a frame there are pages from other web 
sites, can I hide some of there images if I know what there SRC is? For 
example, let's say you go to my site and there I have a button that when 
clicked, the Nike site loads into my frame...but I don't want to see their 
logo (the "Swoosh"). Can't I do something like:

if (document.images.src == "Swoosh.jpg")
{
src = hide
}

I know that it's not correct syntax, but is there something similar that I 
can do?

Thanks in advance,

andy palmer






---------------------------------
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.

  Return to Index