/    Sign up×
Community /Pin to ProfileBookmark

Javascript menu does not show up inside a frame set

Hello,
I have downloaded a nice piece of menu code from the JavaScript Source at [url]http://javascript.internet.com/navigation/toolbar-menu.html[/url]

Basically the code requires you call 2 programs in your html code

<script type=’text/javascript’ src=’nwrmenu_var.js’></script>

<script type=’text/javascript’ src=’menu_com.js’></script>

(I used Save in I.E. to get the 2 programs and graphics)

I’ve modifed the nwrmenu_var.js code and placed both programs in the same directory as my html. The menu bar comes up fine and works well from page to page (I’ve added these to each of my pages).

The home page for this is
[url]www.threshold.ca/reiki/home.html[/url]
and it does not use the javascript (the only page that doesn’t) But from there on every page does.

So for example. if you click on “What is Reiki?” – the page opens and the menu shortly pops up (overtop a text menu – just in case).

My difficulty happens when I make use of frames. If a person comes instead to my index page at
[url]www.threshold.ca/reiki/index.html[/url]
I open up a 2 frame page – – the right frame being the same as above (home.html) and the left frame being stationary.

==================
<frameset COLS=”110,*” BORDER=0>
<frame SRC=”reiki_visitor.html” SCROLLING=NO
MARGINWIDTH=1 MARGINHEIGHT=1>
<frame SRC=”home.html” NAME=”MAIN-WINDOW” >
</frameset>

<noframes>
==================

However now when a person selects “What is Reiki?” (from home.html) the page opens up in the right frame, but for some reason the menu bar doesn’t display. When I try this on the net, there is no indication the menu bar has loaded, and if I reload the page, nothing happens.

However, off-line I can see a message saying the menu is ready – although it still does not display. If I reload the page (offline), the menu does load.

It would seem that there is something being missed or ignored when javascript operates inside a frame.

I would greatly appreciate any help someone could offer.
Thanks.
Rick

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJul 19.2003 — without looking at the code,my guess will be that you are not referencing js code correctly from code if you are in a frame then need to use this format...

parent.frameName.docuemnt....
Copy linkTweet thisAlerts:
@reikithresholdauthorJul 19.2003 — Thanks Khalid,

Unfortunately I have not studied javascript yet so I don't quite know how to put your solution into practice.

parent.frameName.docuemnt....

Does this mean that if I call the javascrpt code from inside a frame, the js code must be using a qualified name?

What would be the value for "parent"? I can guess that "frameName" would be "MAIN-WINDOW" and in the example I gave, "documnt" would be "What_is.html"

If this change was made, would I still be able to run the same code outside of a frame?

Thanks again for your time and for any help you can offer.

Regards,

Rick
Copy linkTweet thisAlerts:
@Khalid_AliJul 19.2003 — [b]

parent.frameName.docuemnt..

[/b]


Sorry wrong spellings

should be read as

parent.frameName.document..
Copy linkTweet thisAlerts:
@reikithresholdauthorJul 19.2003 — Thanks Khalid,

I guessed that the spelling might not be right and knew I would be able to figure it out when it came to programming time (the product of 33 years of coding <smile> )

Most of the code at Javascript Source is pretty easy to follow but this one is more complex.

Thanks for trying to help and I'm sorry you couldn't answer my questions. Maybe someone else out there will have a good idea of what I can do.

Best regards,

Rick
×

Success!

Help @reikithreshold spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...