Click to See Complete Forum and Search --> : onClick Advice Needed, Please!


AngelAndCo
05-19-2004, 09:03 AM
Hello!

I am new here and would like some advice from some of you experts on JavaScript. Let me explain what I am attempting to do (and cannot find an answer to):

I have a framed site. On the main page(s) is a header frame, a contents frame and a main frame (not to be confused with a mainframe such as an IBM 3030. LOL :p ).

In the main frame is an image map. When a user clicks a portion of that image map, I want the contents frame to show the menu for that category (this part I understand how to do), and the main frame to change to an information/advertising page for that category. At this point, I believe, I need an onClick routine to accomplish that :confused: , however, I am unsure as to how it should be written, and if there is a JavaScript routine that must be place within the HEAD Tags of the main frame.

I know that to some that this seems rather complicated; to others rather stupid ... but I would truly like some input and advice as to how (if possible) this may be accomplished.

Thank you in advance for your assistance.

Vladdy
05-19-2004, 09:14 AM
You real problem is misuse of frames.
Your second problem is reliance on javascript for navigation.

Solution:
Make your site functional without javascript and then we can talk about how you can use scripting to enhance it

TheBearMay
05-19-2004, 09:34 AM
While Vladdy's concerns are valid, I have to ask what am I missing? Are you saying that you already know how to change the content in one frame, but not the other?:confused: Probably, just me being dense today.

Pittimann
05-19-2004, 09:53 AM
Hi!

Just try something like:

<area href="menu1.htm" target="contents" onclick="location.href='info1.htm'" shape="..." coords="...">

That would open "menu1.htm" in the contents frame and "info1.htm" in the frame, the map is situated in...

Cheers - Pit

AngelAndCo
05-27-2004, 07:42 PM
Thank you to everyone who gave a helping hand and/or advice. All was greatly appreciated! :p

Pam Jackson