Welcome to WebmasterWorld Guest from 50.16.112.199

Forum Moderators: open

Javascript between frames in NS4

NS4 scripting problems

   
9:17 am on Oct 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi everyone -

Here's the deal: I have a page with three frames. Top frame, and underneath is a frame on the left, and one on the right. The left frame is used to hold a special image, which is to change according to the page that is loaded in the right frame, which holds the content. Top frame is navigation.

So what I've done is in each content page, in the BODY tag I say onLoad="picChange()"
and my picChange function contains the code necessary to change the image in the left frame.

It works perfect in IE5 and NS6, but NS4 likes to give me headaches. It just doesn't do anything

Any ideas? Does NS4 have trouble with onLoad events?

Thanks in advance,

Matt..

9:32 am on Oct 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why worry about it? The six or seven remaining NS4 users probably aren't interested in seeing your picture change anyway :-)
9:58 am on Oct 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Matt,

If it's not actually and onLoad event meaning that both frames change when a visitor clicks on a link, here's a script which has worked for me. On a three-frames page, it changes two frames on one click.

<script type="text/javascript"> <!--
function changePages(imageURL, contentURL) {
parent.image.location.href = imageURL;
parent.content.location.href = contentURL;
}
-->
</script>

Then for your link:
<a href="javascript:changePages(image_whatever.html', 'content_whatever.html');">Link</a>

Of course, you would change "image" and "content" to whatever your frames pages are actually called. Hope this helps.

10:19 am on Oct 9, 2001 (gmt 0)

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>six or seven remaining NS4 users

The remaining NS4+ users could be Yahoo editors. Yahoo will accept the $299 for Business Express inclusion and refuse a site that lacks cross-browser compatibility.

8:10 am on Oct 10, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the help! I'll give it a shot. Yeah, it sucks that there's still a few people using NS4. It's such a pain to design for!!
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month