An imagemaps, javascript and database question!

Discussion in 'Web Design and Development (archive)' started by brianellisrules, Oct 29, 2003.

  1. macrumors regular

    Joined:
    Oct 17, 2003
    #1
    Hey, I have an image map setup with several "onmouseover" javascript commands that activate pop up menus. The thing is, these menus will be added to quite often and already my javascript header is getting massive. Is there a way to setup a database file so that on a mouseover on a certain area, it'll bring up values from a database to populate the menu(s) with?

    Here's what I have: www.brianellisrules.com/stickers/

    Each of the towns listed for a particular state are all listed in the header portion of the page. It's getting pretty bulky. What I'd like to do is have a database file with all the info that the script will access to bring up the values.

    Is there a downside to using a database (if possible) for this? If so, is there a better way?

    Thanks!
     
  2. Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #2
    A DB could definitely help out, but...

    Personally, I think you should rethink the image maps, since they are bad for accessibility. The long rollovers are tricky, too, since they can flow off the bottom of the screen.

    I'd recommend doing something simpler like this: http://www.apple.com/retail/

    Not as fun, but more functional.
     
  3. thread starter macrumors regular

    Joined:
    Oct 17, 2003
    #3
    Hmmm, ok, pretend I have a mac now and answer the question... :D




    I hear ya though. The alternate method didn't look very fun at all unfortunately. This is definitely a novelty thing anyway though.

    Is there a way to make the long listing (i.e. New Jersey) break down into 2 or more columns?
     
  4. Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #4
    To be honest, I don't do a whole lot with javascript, so I can't give you something off the top of my head.

    You can probably do it manually (i.e. make a modified js that loads 2 columns for the more prolific states.
     
  5. macrumors G3

    jelloshotsrule

    Joined:
    Feb 7, 2002
    Location:
    serendipity

Share This Page