|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
category selection help
Hello everybody,I'm new but making progress in learning php...to learn php i wrote my own classified program but need somehelp with the way the category behaves. i like it to be able to select the category using the mouse and have it run a php code or a function based on the click and maybe have it change color when the mouse moves over it..this is what i have soo far: http://www.comgen.ca/phptest/mainclas.php.
any help you can give me would be greatly appreciated.. maybe a sample code to start me of/ thanks everybody |
|
#2
|
|||
|
|||
|
RE: category selection help
Those type of things are done on the client side, ie JavaScript.
To execute some PHP code when the user clicks on an object ... use the onClick() to call your script. To have it change colors when the user mouse over the link you can a) use javascript onMouseOver() and onMouseOut() or b) use css hover. That get you going in the right direction. |
|
#3
|
|||
|
|||
|
RE: category selection help
you mean "To execute javascript code..", not "To execute PHP code..", right?
|
|
#4
|
|||
|
|||
|
RE: category selection help
Yeah, it is sort of vague.
Use the objects onCLick() to execute your javascript code that calls you php code. How was that? |
|
#5
|
|||
|
|||
|
RE: category selection help
hehe, close.. more descriptively :
Assign the property of the html object, onClick to a javascript function - ie. <img src=blah.gif onClick='window.location("test.php");'> to force the browser to go to the page containing the server side php code.. But your explanation is probably clearer ;) |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > category selection help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|