dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: onClick Advice Needed, Please!

  1. #1
    Join Date
    May 2004
    Location
    Baltimore, MD
    Posts
    4

    Question onClick Advice Needed, Please!

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

    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 , 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.

  2. #2
    Join Date
    Nov 2002
    Location
    Nashua, NH
    Posts
    3,195
    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

  3. #3
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    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? Probably, just me being dense today.

  4. #4
    Join Date
    Nov 2003
    Location
    Aachen, Germany
    Posts
    4,090
    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

  5. #5
    Join Date
    May 2004
    Location
    Baltimore, MD
    Posts
    4

    Thumbs up Thank You!

    Thank you to everyone who gave a helping hand and/or advice. All was greatly appreciated!

    Pam Jackson

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles