🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.javascript
6 messages
6 total messages Started by Rob Sedgwick Sun, 27 Jun 1999 00:00
Netscape and objects in the frames collection
#213
Author: Rob Sedgwick
Date: Sun, 27 Jun 1999 00:00
19 lines
1325 bytes
In IE it is possible to access objects in another frame using the
parent.frames collection, e.g.

parent.frames["bottom"].prev.className = "Style1";

here "prev" is the id of an image on the page within the frame "bottom"

This does not seem to work in Netscape where the items in the frames
collection do not seem to refer to the original pages.
Does anyone know a work-around for this?

Rob

--

E-mail:    rsedgwick@justinfashanu.demon.co.uk
ICQ UIN:   26075211
Homepage:  http://www.justinfashanu.demon.co.uk
Cockatiel Genetics: http://only.at/cockatiels
Re: Netscape and objects in the frames collection
#209
Author: Steve van Dongen
Date: Sun, 27 Jun 1999 00:00
20 lines
1466 bytes
Rob Sedgwick wrote:
> 
> In IE it is possible to access objects in another frame using the
> parent.frames collection, e.g.
> 
> parent.frames["bottom"].prev.className = "Style1";
> 
> here "prev" is the id of an image on the page within the frame "bottom"
> 
> This does not seem to work in Netscape where the items in the frames
> collection do not seem to refer to the original pages.
> Does anyone know a work-around for this?

There is no need for a workaround; referring to object in other frames
works using the same code as IE.

className doesn't work in NN and there is no workaround for that.

Regards,
Steve
Re: Netscape and objects in the frames collection
#210
Author: Rob Sedgwick
Date: Mon, 28 Jun 1999 00:00
41 lines
2173 bytes
Steve van Dongen <svandong@uniserve.com> wrote in message
news:3776D26C.951E431@uniserve.com...
> Rob Sedgwick wrote:
> >
> > In IE it is possible to access objects in another frame using the
> > parent.frames collection, e.g.
> >
> > parent.frames["bottom"].prev.className = "Style1";
> >
> > here "prev" is the id of an image on the page within the frame "bottom"
> >
> > This does not seem to work in Netscape where the items in the frames
> > collection do not seem to refer to the original pages.
> > Does anyone know a work-around for this?
>
> There is no need for a workaround; referring to object in other frames
> works using the same code as IE.
>
> className doesn't work in NN and there is no workaround for that.
>

OK, maybe that was a bad example. Here's the declaration of the thing I want
to modify

<A ID=next HREF="gallery2p.htm" target="picture"> <img
src="pictures/next.gif" align="right"> </A>

And here's trying to modify it from another frame

 parent.frames["bottom"].next.href = "gallery2p.htm";

NN says "parent.frames.bottom.next has no properties."

Rob


--
E-mail:    rsedgwick@justinfashanu.demon.co.uk
ICQ UIN:   26075211
Homepage:  http://www.justinfashanu.demon.co.uk
Cockatiel Genetics: http://only.at/cockatiels
Re: Netscape and objects in the frames collection
#211
Author: Doug Greenhough
Date: Mon, 28 Jun 1999 00:00
43 lines
2441 bytes
In article <930551794.12372.0.nnrp-02.d4e4e97b@news.demon.co.uk>, Rob
Sedgwick <newsgroups@justinfashanu.demon.co.uk> writes
>Steve van Dongen <svandong@uniserve.com> wrote in message
>news:3776D26C.951E431@uniserve.com...
>> Rob Sedgwick wrote:
>> >
>> > In IE it is possible to access objects in another frame using the
>> > parent.frames collection, e.g.
>> >
>> > parent.frames["bottom"].prev.className = "Style1";
>> >
>> > here "prev" is the id of an image on the page within the frame "bottom"
>> >
>> > This does not seem to work in Netscape where the items in the frames
>> > collection do not seem to refer to the original pages.
>> > Does anyone know a work-around for this?
>>
>> There is no need for a workaround; referring to object in other frames
>> works using the same code as IE.
>>
>> className doesn't work in NN and there is no workaround for that.
>>
Damn, you NN! (only joking NN fans, should be "Damn you, IE!!" really)
>
>OK, maybe that was a bad example. Here's the declaration of the thing I want
>to modify
>
><A ID=next HREF="gallery2p.htm" target="picture"> <img
>src="pictures/next.gif" align="right"> </A>
>
>And here's trying to modify it from another frame
>
> parent.frames["bottom"].next.href = "gallery2p.htm";
>
>NN says "parent.frames.bottom.next has no properties."
This menas that the object can't be found, and can be solved by using
name= instead of id= (Damn you, IE!! (Happy now Netscape lovers?))

Doug

-- 
Doug Greenhough                 the Spirit Demon
mailto:doug@spirit.demon.co.uk  http://www.spirit.demon.co.uk
Re: Netscape and objects in the frames collection
#207
Author: Doug Greenhough
Date: Tue, 29 Jun 1999 00:00
23 lines
1640 bytes
In article <930636938.5263.0.nnrp-13.d4e4e97b@news.demon.co.uk>, Rob
Sedgwick <newsgroups@justinfashanu.demon.co.uk> writes
>Doug Greenhough <doug@spirit.demon.co.uk> wrote in message
>news:EODmfHA425d3EwcJ@spirit.demon.co.uk...
>> This menas that the object can't be found, and can be solved by using
>> name= instead of id= (Damn you, IE!! (Happy now Netscape lovers?))
>>
>
>Nope that doesn't work either! Where next with Netscape?
>
>Rob
The bin.

Sorry, too late at night, that one. Use 
parent.frames["bottom"].document.next.href
                        ^^^^^^^^
HTH

Doug

-- 
Doug Greenhough                 the Spirit Demon
mailto:doug@spirit.demon.co.uk  http://www.spirit.demon.co.uk
Re: Netscape and objects in the frames collection
#208
Author: Steve van Dongen
Date: Tue, 29 Jun 1999 00:00
26 lines
1772 bytes
Rob Sedgwick wrote:
> 
> OK, maybe that was a bad example. Here's the declaration of the thing I want
> to modify
> 
> <A ID=next HREF="gallery2p.htm" target="picture"> <img
> src="pictures/next.gif" align="right"> </A>
> 
> And here's trying to modify it from another frame
> 
>  parent.frames["bottom"].next.href = "gallery2p.htm";
> 
> NN says "parent.frames.bottom.next has no properties."

parent.frames["bottom"].document.links[i].href where i is a zero-based
index referring to the (i+1)th link in the document.  In other words,
the first link is 0, the second link is 1, ...

You can't use a NAME attribute because then your link would not
necessarily be a link anymore -- it would be an anchor -- and the ID
attribute isn't recognized in released version of NN.

BTW, this problem is not related to frames.

Regards,
Steve
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads