|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I got a problem: 3 frames (left, center, right). The LEFT contains the navigation bar made of 6 roll-over buttons (made with GoLive). Now, when I click on one, I change the content of CENTER, but I'd also like that the pressed button remains in its last state. How do I achieve this??? I tried with document.images[1].src="image.gif", but nothing worked...
HELP ME!!! |
|
#2
|
|||
|
|||
|
What you seek can be done. It helps if you use an alphanumeric identifier for your left frame pictures, but you can also load the values into an array:
var leftImages = new Array leftImages[0]="image1" leftImages[1]="image2" . . . leftImages[n]="image" + n //if you use a similar naming convention you could use a loop to declare the values of the array. then you need some code that will preserve the state of the button you've clicked and return all the others to their original state. function Call_This_at_OnClick(button){ var been_clicked = button for(i=0;i<n;i++){ if (leftImage[i]!=button){ document.all[leftImage[i]].src='original_state.gif' } } } That's essentially it, though the above code is only a rough outline and I can't guarantee that it won't need some tweeking. But basically, you just have to set up some way that will reset all the images except the one you clicked on. Hope that helps. [This message has been edited by billyo (edited July 02, 2000).] |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Changing image in a frame from within another frame |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|