moncho007 Posted April 8, 2008 Share Posted April 8, 2008 Hello everyone! This is my first post, so I'm not very sure if this is the right forum section to post my problem... Anyway here's the situation. I'm just starting to learn PHP and so far I've got a working forum and site. I've made buttons with the GIMP for my site (you know - contacts, home, etc.. ) and I want to do when the user moves the mouse over some of the button (not clicking on it) to highlight the same button (in my case I'd like to change the button image with another one). I'd like to do the same, but this time when the user clicks on the button. I've searched the web and all I found was about JScript. I'm not very sure if you understood me . Hope someone will answer my post and help me solve this. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
trq Posted April 8, 2008 Share Posted April 8, 2008 Client side effects are done using a client side language like Javascript, php runs server side. Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 8, 2008 Share Posted April 8, 2008 This effect must be done with Javascript or CSS Quote Link to comment Share on other sites More sharing options...
moncho007 Posted April 8, 2008 Author Share Posted April 8, 2008 Thanks for the fast replies! Could someone show me how to write such a thing using JavaScript or even better point me to a decent tutorial about JavaScript? Thanks again! Quote Link to comment Share on other sites More sharing options...
haku Posted April 8, 2008 Share Posted April 8, 2008 You don't want to do this with javascript. It can be done with javascript, but will require that the user have javascript turned on. It can be done with less code and more reliably using CSS. This tutorial is a good place to start. They have an on-click image change built into it (as well as a rollover). Quote Link to comment Share on other sites More sharing options...
moncho007 Posted April 10, 2008 Author Share Posted April 10, 2008 Thanks for your help, guys! I'll go reading CSS tutorials, it seems that there are more efficient ways to do what I want - for example using a transparency for my buttons Thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.