|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Here is the Code:
function linksfun() { document.sitelayout_17.src="images/sitelayout_17-links_over.gif"; } <A HREF="links.htm" onClick="linksfun();"> I want that image to stay displayed until another onclick changes it. I'm not real good with JavaScript and I thought that maybe using the return thing would work but it didn't. How would i go about doing this? |
|
#2
|
||||
|
||||
|
So you want the image to change when clicked.
Call your function, determine what the current filename is (imagename.src property), then, if it's the on-state image, set the src to be the off state, and vice versa. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Make the Image Stay |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|