|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
triggering show hide layers by ID
I have a small image on my right side and one big one on my left hand side. now I want the bigger image to be viewed by rolling over the smaller image what contains a repeat region of 8 records.
The bigger one is a repeat of 1 records and is in a layer with show / hide function. how can i get this working ? plz help |
|
#2
|
|||
|
|||
|
Message Moved
Thread moved from 'PHP Coding' to 'Client Side Things' by nawlej.
Reason: javascript and CSS question. |
|
#3
|
|||
|
|||
|
RE: triggering show hide layers by ID
This javascript defines all of your images, and preloads them (being a big image, you dont want to pull it down on mouseover.....then, the functions at the bottom are called from your <a href> tag...
Code:
<script language="javascript"><!--
if (document.images) {
var imagea = new Image()
imagea.src = "images/imagea.gif"
var imagen = new Image()
imagen.src = "images/imageb.gif"
}
function active(imgName) {
if (document.images)
document[imgName].src = eval(imgName + 'a.src');
}
function inactive(imgName) {
if (document.images)
document[imgName].src = eval(imgName + 'n.src');
}
// -->
</script>
to switch the image, call it like this inside of your small one..... Code:
<a href=# onMouseover="active('image');" onMouseout="inactive('image');"><img src="images/images.gif" name="images" border=0></a>
Your big image would be toggled as imagea.gif in the code. You can pretty much get it to do what you want by messing with it a little. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > triggering show hide layers by ID |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|