Welcome to WebmasterWorld Guest from 54.196.153.46

Forum Moderators: open

Message Too Old, No Replies

Javascript between frames in NS4

NS4 scripting problems

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 28, 2001
posts:779
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2001
posts:1265
votes: 12


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)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts:2176
votes: 15


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)

Senior Member

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

joined:Sept 29, 2000
posts:12095
votes: 0


>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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 28, 2001
posts:779
votes: 0


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!!