[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

this (onload) works in netscape, but not in ie.. help!?!

Posted on 1997-11-01
7
Medium Priority
?
246 Views
Last Modified: 2013-12-25
OK... I've got a site I'm building using frames.  Here's the default page setup:

<frameset rows="8%,6%,*" border=0 framespacing=0 frameborder=0>
<frame src="nav.htm" name="nav" marginwidth=5 marginheight=0 scrolling=no>
<frame src="nav1.htm" name="nav2" marginwidth=5 marginheight=0 scrolling=no>
<frame src="main.htm" name="main">
</frameset>
*************

here's nav.htm

<body background="" bgcolor="#000000" text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff">

<table width=100% border=0>
<tr align=center>
<td><a href="nav2.htm" target="nav2">Chatting</a></td>
<td><a href="nav3.htm" target="nav2">Moderators</a></td>
<td><a href="nav4.htm" target="nav2">Operators</a></td>
<td><a href="nav5.htm" target="nav2">Support</a></td>
</table>
</body>
*************

nav1.htm is a "blank" page as the "nav2" frame is supposed to be empty when the page is first hit

when you click on "chatting" in the nav (top) frame, "nav2.htm" should get loaded into the "nav2" frame


here's nav2.htm

<body background="" bgcolor="#00ff00" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000" onload=parent.frames.main.location.href="starting.htm">
<center>
<table width=90% border=0>
<tr align=center>
<td><a href="starting.htm" target="main"><font size=-1>Getting Started</font></a></td>
<td><a href="chat.htm" target="main"><font size=-1>Chatting</font></a></td>
<td><a href="join.htm" target="main"><font size=-1>Joining a New Room</font></a></td>
<td><a href="bother.htm" target="main"><font size=-1>If Someone Bothers You</font></a></td>
<td><a href="nickreg.htm" target="main"><font size=-1>Own Your NickName</font></a></td>
</table>
</center>
</body>
*********

(there are other nav(some number).htm's, but if one gets fixed, they'll all get fixed.)

the problem is in the onload statement in nav2.htm --- it works *beautifully* with Netscape (3.04) -- but in IE (3.02) it craps out saying "in frame nav2 'main' is not an object"

now, I *have* to have this thing working perfectly with both Netscape & IE - and preferably with versions 3.x & 4.x of both.

I do *not* want some huge long javascript thing that's going to take up a jillion lines of code (besides the fact that I don't know javascript, so it would be rather difficult for me to decipher your instructions...)

Soo... can anyone fix my onload statement so that it works for both browsers?

(correct/working answer within 24 hours and I'll double the points :)

Nnickee
0
Comment
Question by:Nnickee
  • 4
  • 3
7 Comments
 
LVL 6

Accepted Solution

by:
Holger101497 earned 400 total points
ID: 1855417
well... this answer seems so simple that it's hardly worth 200 points ;-))
I'm well ahead of the 24h deadline though ;-) (and I deserve the points for creating the files and installing IE3 just to check my answer *g*)

Here we go:
I am actually surprised that this works in Netscape! I have never seen this syntax before.
*** Instead of parent.frames.main you have to say parent.main ***

frames is normally an array that can be indexed by frames[0] or frames["name"]. Obviously Netscape is very forgiving and lets you access it as frames.name although it doesn't make so much sense ;-)
See? It's not jillions of lines, it actually makes it shorter! *g* Some other thing you can do to make it shorter is to eliminate the href - it is the default property of location. Your onload could therefore be: "top.main.location='starting.html'"

Good luck with your site! Let me know if there are still problems  with this (shouldn't ;-), I'll answer in 8 hours (after sleeping ;-)
0
 

Author Comment

by:Nnickee
ID: 1855418
awesome!!!!

I just knew someone out there would be able to make it work :)

now.. *hopefully* the 4.x versions of the browsers haven't broken it :)

anyway, thanks a million.. and yes, it's still worth the 200 points *to me*

Nnickee

0
 

Author Comment

by:Nnickee
ID: 1855419
Holger,

I swear to you.. I clicked on the "increase points to" and entered 200 in the box... somehow tho, it only awarded the original 100 pts for your answer (I still have 100 pts left, so I know it's not that I ran out of points) .. anyway, I've already left a note with customer service - if they don't fix this within the next day or so ... hmmm.. I guess I could always ask another question in here (like.. uhhhh.... "what does html stand for?" or something else really lame) and give you the other 100 pts for that one... I'm really sorry for the mixup, and I don't want you to think that I'm welshing on the deal... the answer is still worth 200 pts to me :)
Nnickee

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Expert Comment

by:Holger101497
ID: 1855420
*laugh* - we're both pretty fast *g* - just saw your comment in customer service and wanted to add a "My respect! What an honest 'customer'!" *g*

As far as the 4.x versions are concerned: no, they haven't broken it *g* - as a thorough expert, I tested that before I posted the answer ,-)

So once again: Good luck with your site, looks pretty good so far (although I'm being cheated out of the content *g* - I'd also prefer a darker green *g*)
0
 

Author Comment

by:Nnickee
ID: 1855421
Holger,

You are absolutely awesome :)  (you single?? j/k )

Isn't that green disgusting?!?  (it matches the logo tho, so what can I do?  I'm only writing the manual :)

you want content, huh?  leave me your email address, and as soon as we release this software, I'll drop you a line so you can grab a copy... and see all the wonderful content that you helped make possible :)

Nnickee
0
 
LVL 6

Expert Comment

by:Holger101497
ID: 1855422
Me single - you Jane? I guess not *lol* ;-)

The site looks like a chat, so I guess the URL won't be a big secret? *g* Just post it here and I'll get an e-mail - I don't really want to post my address here. Maybe I'll take a look at the chat and find you? (same login?) Although it would of course be a competitor for a chat I'm currently developing a really really nifty JavaScript interface for *g* (500+ lines of code!) - maybe I can find some new ideas ;-)

About the green: well... I was trying to be diplomatic ;-)
About the points: whatever... as much as I'd like to have the points because they would finally put me into the toplist for this area, don't worry about it. I appreciate the effort! If customer service fixes it, great, if they don't, you can give me the exclusive rights to answer your next JavaScript-question ;-) As long as it is JS and there is an answer, I'll find it *g*

??? (ran out of good closing lines *g*) - have fun! Don't work too much! It's Sunday! (well.. as long as you're west of India :)
0
 

Author Comment

by:Nnickee
ID: 1855423
Holger,

Too bad *grin*

Wow, you're smart... yes, it has to do with chat stuffies... and no, the site won't be a secret after we release (hopefully tomorrow :) ... so keep the "notify me when updated" on this question, and as soon as we release, I'll come back and post the url for ya (I'd do it now, except you went and told me that you're developing some competition, so now you're just gonna hafta wait the same as all our other competition to see it :)

(and no, *I'm* not programming it... I just test it and write the docs and will be doing tech support for it... so yes, once released and all, you'll be able to find me as "Nnickee" :)

customer service hasn't fixed the points thingy yet.... then again, it's only *barely* Monday now... I'll give 'em until midnight tonight, and if it still isn't fixed, I'll come back with another question for ya...

and yeah, I'm west of India... Texas, to be exact (yeeehaaawwww!)

cya in a couple days (prolly :)

Nnickee

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month18 days, 5 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question