<input>'s

Discussion in 'JavaScript' started by SirKay, Jan 11, 2007.

  1. #1
    Can someone help me out with this:
    <input type=image src=collect.png onfocus=collectknipper.gif name='stop' value='1' onclick=collectbutton.png></td>
    				<td>&nbsp;</td>
    				<td>&nbsp;</td>
    				<td valign="top">
    				<input type=image src=playknipper.gif onfocus=playknipper.gif onclick=playbutton.png name='submit' value='1'></td>
    PHP:
    I want to have this one show the picture collect.png if there's not a mouse on or on being clicked, when a mouse clickes on it I'd like to have collectbutton.png en when the mouse focusses on the button collectknipper.gif...
    But how do I do this?
    does someone else also nows how to do the same with checkboxes?
    Much ty's
    Me
     
    SirKay, Jan 11, 2007 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    instead of onfocus=collectknipper.gif try:
    
    onfocus="this.src='collectknipper.gif';"
    
    Code (markup):
     
    frankcow, Jan 11, 2007 IP
  3. SirKay

    SirKay Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Tried, but I didn't get anything out of the browser...
     
    SirKay, Jan 11, 2007 IP
  4. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #4
    you may not be able to change the source of an input image

    why not just use a normal image instead?
     
    frankcow, Jan 11, 2007 IP