homepage Welcome to WebmasterWorld Guest from 54.167.174.90
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Javascript between frames in NS4
NS4 scripting problems
madmatt69

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 7 posted 9:17 am on Oct 9, 2001 (gmt 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..

 

IanKelley

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 7 posted 9:32 am on Oct 9, 2001 (gmt 0)

Why worry about it? The six or seven remaining NS4 users probably aren't interested in seeing your picture change anyway :-)

Marshall

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 7 posted 9:58 am on Oct 9, 2001 (gmt 0)

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.

Marcia

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



 
Msg#: 7 posted 10:19 am on Oct 9, 2001 (gmt 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.

madmatt69

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 7 posted 8:10 am on Oct 10, 2001 (gmt 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!!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved