Results 1 to 2 of 2

Thread: Navigation Bar Problem

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Navigation Bar Problem

    How do I code in javascript for the oncilck event for buttons on a navigation bar so the button appears clicked (when clicked)? I created a navigation bar in fireworks with 3 states (up, onmouseover and onclick). I have all the images for the onmouse over and onclick and have imported the navigation bar into Dreamweaver. The onmouseover works but the onclick does not. So when the button is clicked and goes to the next webpage (coldfusion), the navigation bar appears in the upstate for all the buttons. I need to the button to be in the downstate (the one they clicked).

    Really looking forward to replies

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    1) there is a separate forum for javascript read the Posting Policy especially #2

    MOD PLEASE MOVE THIS THREAD


    2) the onclick is like following the link, if you wish to override the onclick then you need to void the follow, however you need the think about accessibility because people without javascript enabled (disabled it, dont support it) will return to the default settings of that element, in this case you are using an anchor tag.
    Code:
    <a href="url" onclick="something; return false" onmouseover="something else" onmouseout="yet something else">Link</a>
    3) making the link appear in the down state is tricky with just javascript. if you have a server-side code it would be much easier to assign the link to be selected.

    please remember to read the and post the url to the problematic code / if not live post the code encapsulated in [code] tags

Bookmarks

Posting Permissions

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