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
    Jul 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 state rollover image script

    im looking for a php script that has mouse over and active image depending on what page you have, i cant seem to make images active like if in on the home page the home button nav is the active state and if on chat the chat is active state

    my page where i have done a rollover in javascript is here: http://www.darkrealm.ca

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,915
    Thanks
    15
    Thanked 227 Times in 227 Posts
    For php to do mouseover you have to send and receive from the server, and javascript has to detect the mouseover. So why not do it with javascript all the way?

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i dont mind doing javascript. i cant find a good example to use an active image with javascript though.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,915
    Thanks
    15
    Thanked 227 Times in 227 Posts
    I'm presuming that by 'active' you mean a hyperlink. The only way that i can think of offhand is to use the onclick="window.open();" method, as opposed to wrapping it in an anchor tag. You can call the window.open method inside a function, and you can assign it without having it explicit in the img tag. You can reuse the current window too, the default for that method is a new window.


  •  

    Tags for this Thread

    Posting Permissions

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