53 users online (0 members and 53 guests)  

Thread: Rollover Effect


  Results 1 to 13 of 13

Related

  1. scrolling effect is needed    Forum: Javascript Forum
    Replies: 0
  2. Fade-effect    Forum: Javascript Forum
    Replies: 0
  3. Replies: 1
  4. Cool effect. How did they do it?    Forum: Javascript Forum
    Replies: 1
  5. Cycling Banner Fade In Effect    Forum: Javascript Forum
    Replies: 3
  1. #1
    slybitz's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2002
    Posts
    3

    Arrow Rollover Effect

    So it's been awhile since i did a rollover effect w/ buttons but i have no idea what's wrong w/ my code. It won't show the button(*.gif file) on my web page but only an outline of it. It does allow the link to work though. ONMOVER actually means ONMOUSEOVER, eva means eval and ONMOUT actually means ONMOUSEOUT but it wouldn't let me put it. Please help!--->

    <HTML>
    <HEAD>
    <TITLE>blah blah</TITLE>

    <script language="javascript1.1">
    <!--
    firstimage=new Image()
    firstimage.src="C:\My Documents\My Pictures\button.gif"
    secondimage=new Image()
    secondimage.src="C:\My Documents\My Pictures\buttonM.gif"

    //-->
    </script>

    <script>
    <!--
    function changeIt(imagename,objectsrc)
    {
    if (document.images)
    { document.images[imagename].src=eva(objectsrc+".src") }
    }
    //-->
    </script>
    </head>

    <body background="C:\My Documents\My Pictures\sideline.gif" LEFTMARGIN="0" BGCOLOR="#FFFFFF" TEXT="#000000">
    <br><br><br>
    <center>
    <a href="somewhere.htm"
    ONMOVER="changeIt('Next','secondimage')"
    ONMOUT="changeIt('Next','firstimage')">
    <img border="0" name="Next"
    src="C:\My Documents\My Pictures\button.gif"></a>
    </center>

  2. #2
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    If you are using short hand coding, why not just put the full word?

  3. #3
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Hey slybitz, welcome to the forums!

    I am assuming your HTML document is on your local machine and not on a server, am I correct or is it already uploaded?

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  4. #4
    slybitz's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2002
    Posts
    3

    Rollover Effect

    Yes it's on my local machine but that shouldn't matter nor should putting the files into one folder matter. The code seems correct to me but obviously it's not.

    Sly

  5. #5
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    I only ask because in my experience it is the silly and obvious that we often times overlook.


    You may want to check out this easy to understand tutorial at http://www.jsworld.com/tutorials/rollover

    Let us know how it turns out.

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya.

    All the passing of variables is mangling the Windoze path name. View source on a mouseover 'square' to see what I mean.
    I suggest changing the sources from absolute to relative -

    Code:
    <script language="javascript1.1">
    <!--
    firstimage=new Image()
    firstimage.src="button.gif"
    secondimage=new Image()
    secondimage.src="buttonM.gif"
    
    //-->
    </script>
    This works for me like this. Just make sure the html page is in the same folder as the images. or use a relative path to navigate to the images. Its a good practice to get into because it saves you changing all the sources and src tags when you upload to the web.

    And yes, this should of worked. I blame windoze.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    GO MAC.... and or linux

  8. #8
    slybitz's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2002
    Posts
    3

    Talking

    Thank you all very much. You have been more than helpful to me. I really appreciate it! I figured it out and my site looks great! I'll show it to you when I'm completely done.

    Sly

  9. #9
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    mac is an unspeakable subject
    liniux is good but only when u want security cause it sux when it comes to a lot of other things.
    windows has a lot of loopholes but is userfriendly and just easy to use.

    go windows...

  10. #10
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Originally posted by Derek
    mac is an unspeakable subject
    liniux is good but only when u want security cause it sux when it comes to a lot of other things.
    windows has a lot of loopholes but is userfriendly and just easy to use.

    go windows...
    You should be beaten with a stick.. mac's are awsome, and linux is even better, windows undoubtedly sucks...

  11. #11
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Windoze is userfriendly? Are you mad? Are we using the same software here?

    Macs rock. Linux is da bomb, though.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  12. #12
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    liniux is the best I agree but I just have this thing against mac...ick I hate em. to me their just a windows wannabe thats a little bit more stabler haha ya it's user friendly and easy to use...makes installing things and running most things easier to me at least...

  13. #13
    Zaire's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Hamburg, NY
    Posts
    312
    Mac a windows wanna be?

    Man, i think your backwards.. windows is a mac/linux wanna be..

    Where did windows ideas originate? When Bill "$$" Gates stole the ideas from Steve Jobs :P

    Correct me if im wrong, but I do believe im right on this one...

    I also herd, that bill gates sold the rights to dos, when infact, ibm still currently owned them

    Gawd, I hate That Man

    -Eric



Tags for this Thread