SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 22nd, 2000, 11:03 AM
bonnyfused bonnyfused is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 6 bonnyfused User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!!!

Reply With Quote
  #2  
Old July 2nd, 2000, 12:59 PM
billyo billyo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 114 billyo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Changing image in a frame from within another frame


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway