Results 1 to 2 of 2

Thread: Time crunch - need help - mouseover calling 2 items

  1. #1
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Time crunch - need help - mouseover calling 2 items

    I would like a mouseover to force and image swap - and also change the image map that's being used.

    So i would like to combine something like this:

    the image swap code:
    onMouseOver="document.getElementById('mainlink').href=

    with something like this - the usemap code:
    onMouseOver="document.mainlink.setAttribute('usemap','#Map2',0)

    How do i combine those into one? Or can i/should i?

    Thanks!

  2. #2
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default

    The pieces of code you have between the double quotes ( " " ) are called statements.

    By ending the statements with a semicolon, you can have more than one in there. To use your code:

    onMouseOver="document.getElementById('mainlink').href=[new href here];document.getElementById('mainlink').setAttribute('usemap','#Map2',0);"

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
  •