Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing a list selection

    Is it possible to have html code such as:
    </br><a href="#" onMouseOver="document.images[1].src='p_felton.jpg'" onMouseOut="document.images[1].src='unc_thumb.gif'">#2 - Raymond Felton</a>

    and then add something like onClick="document.selection.choice.options.selectedIndex='1'"
    to change then index that is currently showing and highlighted in a dropdown list??
    thanks for any help.

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes. Exactly like that.

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,047
    Thanks
    0
    Thanked 251 Times in 247 Posts
    except that selectedIndex should not be a string but an integer, and there should be a return false after to cancel the href.

    <a href="#" onMouseOver="document.images[1].src='p_felton.jpg'" onMouseOut="document.images[1].src='unc_thumb.gif'" onClick="document.selection.choice.options.selectedIndex=1;return false" >#2 - Raymond Felton</a>

  • #4
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    got it workin perfect, thanks a lot


  •  

    Posting Permissions

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