Results 1 to 2 of 2

Thread: Help please/moving buttons/images

  1. #1
    Join Date
    Apr 2008
    Posts
    13

    Help please/moving buttons/images

    I am a newbie and I ask that someone please help me. I am currently using Dreamweaver 8, and I am trying to get my image/buttons to move up or down when the mouse touches over it, and when the mouse leaves I would like for it to go back to its original position on the page. Does anyone know the java script code for this? Are there tutorials on how to do it?

  2. #2
    Join Date
    Jun 2008
    Location
    cardiff
    Posts
    77
    you could use flash to do this and as a newbie its a lot more frendly than jumping straight into javascript however


    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE=JavaScript>
    intImage = 2;
    function swapImage() {
    switch (intImage) {
    case 1:
    IMG1.src = "http://www.microsoft.com/library/toolbar/images/mslogo.gif"
    intImage = 2
    return(false);
    case 2:
    IMG1.src = "http://msdn.microsoft.com/msdn-online/start/images/msdn-logo.gif"
    intImage = 1
    return(false);
    }
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <IMG id="IMG1" name="IMG1" src="http://www.microsoft.com/library/toolbar/images/mslogo.gif"
    onclick="swapImage();">
    </BODY>
    </HTML>

    this basic code should do it and if you make the buttons look like they are gogn doen when the moses hovers this should work quite well

Posting Permissions

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