Need to update two frames with one link...

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
User avatar
Stryker
DBB Admiral
DBB Admiral
Posts: 1103
Joined: Sat Jun 12, 2004 7:58 am
Contact:

Need to update two frames with one link...

Post by Stryker »

Java and HTML are the supported languages. I need to get one link to update two frames. The link is placed in a layer, while the two frames are also placed each in their own layer. I'm having trouble getting the links to update even one frame, I'm suspecting because of the layer system. Any of you web developers out there know anything about this?
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

I believe that you cannot access elements of an iframe from the document for security purposes, although you could send a command to the iframe and have it update the frames itself.
User avatar
Mobius
DBB_Master
DBB_Master
Posts: 7940
Joined: Sun Jun 03, 2001 2:01 am
Location: Christchurch, New Zealand
Contact:

Post by Mobius »

He's talking actual frames I believe.

I presume you mean JavaScript - not Java. Java isn't a language which can be interpreted on the web browser. Java Applets, yes. Java, No.

You've just discovered why people don't code sites with frames any more. I'm re-jigging one right now (www.sunamericafunds.com) and it is a right royal pain in the a$$.

I've had a write a huge bundle of javascript to handle the navigation and communications between frames - and if javascript is disabled, then the site will really suck.

Using layers in conjunction with frames is, possibly, the worst approach to any web site solution I've ever heard. Are you talking about DHTML layers? Because that stuff will drive you insane.
User avatar
Stryker
DBB Admiral
DBB Admiral
Posts: 1103
Joined: Sat Jun 12, 2004 7:58 am
Contact:

Post by Stryker »

Actually, I just figured it out. It's remarkably simple, with a mere 5-6 lines of javascript, called whenever a link is clicked. And yes, it is javascript, not pure java. I need the layers/frames combination because the guys I'm doing the site for dumped a single giant image file on me and said "code it", and they expect it to look pretty much like they drew it.

The layers are remarkably simple to use--all I have to do is draw it, make sure it isn't a sub-layer of any of the other layers on the site, and voila. It's very easy to do, and it'll mean retaining all the appearance of the site, which would otherwise be semi-impossible. The layers are also necessary, due to the fact that I really don't want to force the user to reload a webpage with 5 large images and about 10 smaller ones every time he visits another part of the site.
User avatar
Sergeant Thorne
DBB Material Defender
DBB Material Defender
Posts: 4641
Joined: Sun Nov 25, 2001 3:01 am
Location: Indiana, U.S.A.

Post by Sergeant Thorne »

Stryker wrote:And yes, it is javascript, not pure java.
From what I've learned, they're totally different animals. JavaScript ("LiveScript", at conception) was deceptively named, for marketing purposes, and has nothing to do with Java directly, though they do both use a C-like syntax.

FYI
Post Reply