Closed Thread
Results 1 to 9 of 9

Thread: Buttons onMouseOver not working.

  1. #1
    Join Date
    Nov 2009
    Location
    I seem to be lost...
    Posts
    1,566
    Blog Entries
    1
    Rep Power
    22

    Buttons onMouseOver not working.

    OK so I started designing my website and I uploaded my "index.html" to the public_html folder and all my pictures and used this code to make my buttons have a mouse over effect.
    Code:
    <a href="http://google.com/" onMouseover="document.home.src='http://empire-software.hostei.com/public_html/home_btn_hover.jpg'" OnMouseOut="document.home.src='http://empire-software.hostei.com/public_html/home_btn.jpg'" ><img src="http://empire-software.hostei.com/public_html/home_btn.jpg" border="0" name=home />
    </a>
    And the button won't even show up but if I do it like this:
    Code:
    <a href="http://google.com/" onMouseOver="document.about.src='about_me_btn_hover.jpg'" onMouseOut="document.about.src='about_me_btn.jpg'" ><img src="about_me_btn.jpg" border="0" name=about />
    </a>
    the buton will show up but will not change on mouse over. does any one have any idea why this is not working?

    Thanks, +rep for help.
    Knowledge: Intermediate C#, Beginner AS3, HTML, CSS, Binary, Hex, Octal.
    Science is only an educated theory, which we cannot disprove.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: Buttons onMouseOver not working.

    the second one should be working fine, did it work fine before you upload?
    if yes then your problem might be:
    -the mouse-over button image doesnt exist
    -or you dont have permission to the image
    try opening the image in your browser

    let me know if that didnt solve it
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  4. #3
    Join Date
    Nov 2009
    Location
    I seem to be lost...
    Posts
    1,566
    Blog Entries
    1
    Rep Power
    22

    Re: Buttons onMouseOver not working.

    the second one should be working fine, did it work fine before you upload?
    if yes then your problem might be:

    -the mouse-over button image doesnt exist
    Yes I have all my pictures uploaded in the public_html folder.

    -or you dont have permission to the image
    I should have permission I'm the admin.

    try opening the image in your browser
    I clicked view on the image in the public_html folder then copied the image location and changed the code to that link and it worked while the page was loading then it loaded all the way and won't work again even if I refresh it.
    Knowledge: Intermediate C#, Beginner AS3, HTML, CSS, Binary, Hex, Octal.
    Science is only an educated theory, which we cannot disprove.

  5. #4
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: Buttons onMouseOver not working.

    huh?!!
    wtf??
    thats weird, can i see a link?
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  6. #5
    Join Date
    Nov 2009
    Location
    I seem to be lost...
    Posts
    1,566
    Blog Entries
    1
    Rep Power
    22

    Re: Buttons onMouseOver not working.

    OK I changed the code back to
    Code:
    <a href="http://google.com/" onMouseover="document.home.src='home_btn_hover.jpg'" OnMouseOut="document.home.src='home_btn.jpg'" ><img src="home_btn.jpg" border="0" name=home />
    </a>
    and it works totally fine in Google chrome and Opera but only two buttons work in IE and none in FF.

    EDIT* here's the link Home

    EDIT*EDIT* Now it seems to be working in FF after I held my mouse on it for 3 seconds it loaded and worked fine. so I guess it will be ok for now.
    Knowledge: Intermediate C#, Beginner AS3, HTML, CSS, Binary, Hex, Octal.
    Science is only an educated theory, which we cannot disprove.

  7. #6
    Join Date
    Nov 2009
    Location
    London
    Posts
    866
    Blog Entries
    3
    Rep Power
    14

    Re: Buttons onMouseOver not working.

    Yea it took me 3 secs in FF for the first time and now it works instantly, i'm not sure why that is.

    I tested the link in the other browsers and the mouse over image came instantly.

    If the FF issue bothers you I recommend you use my method in this thread:

    Hover buttons

    It works in all major browsers and there is no download time, as the no rollover image and rollover image are the same file.

  8. #7
    Join Date
    Nov 2009
    Location
    I seem to be lost...
    Posts
    1,566
    Blog Entries
    1
    Rep Power
    22

    Re: Buttons onMouseOver not working.

    Yea it took me 3 secs in FF for the first time and now it works instantly, i'm not sure why that is.
    Ya same for me.

    If the FF issue bothers you I recommend you use my method in this thread:

    Hover buttons

    It works in all major browsers and there is no download time, as the no rollover image and rollover image are the same file.
    OK thanks I'll take a look.
    Knowledge: Intermediate C#, Beginner AS3, HTML, CSS, Binary, Hex, Octal.
    Science is only an educated theory, which we cannot disprove.

  9. #8
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: Buttons onMouseOver not working.

    it worked just fine here on opera
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  10. #9
    Join Date
    Nov 2009
    Location
    I seem to be lost...
    Posts
    1,566
    Blog Entries
    1
    Rep Power
    22

    Re: Buttons onMouseOver not working.

    Ya I think I got it working now.
    Knowledge: Intermediate C#, Beginner AS3, HTML, CSS, Binary, Hex, Octal.
    Science is only an educated theory, which we cannot disprove.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Not working in FF/Chrome, working in IE
    By fedlerner in forum AJAX
    Replies: 17
    Last Post: 03-14-2011, 10:26 AM
  2. Lua Help - Buttons
    By mkjt88 in forum General Programming
    Replies: 0
    Last Post: 02-14-2011, 11:00 PM
  3. Triggering/sending false onmouseover singal?
    By 1988 in forum JavaScript and CSS
    Replies: 2
    Last Post: 02-04-2011, 06:09 AM
  4. onmouseover not working
    By EMDY in forum HTML Programming
    Replies: 8
    Last Post: 04-22-2010, 03:05 PM
  5. C# Buttons
    By Darkco in forum C# Programming
    Replies: 6
    Last Post: 12-30-2009, 04:33 PM

Tags for this Thread

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