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 October 19th, 2000, 04:48 PM
annabelle annabelle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 1 annabelle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi there,

I am designing a web site with two frames. One on top that is used as a navigation bar (top frame - name="navigation"), the other at the bottom that is used for my body text(bottom frame - name="body"). The buttons are on the navigation bar and they are different colours. Each colour is for one subsection of the web site. When people click on a button, I want both frames to change. I use different colour buttons and the top frame and bottom frame should have the same colour - colours that are always changing depending on people choice. How can I make the two frames change simultaneously when I click on a button on the top frame?
Thank you for your assistance.

Annabelle

Reply With Quote
  #2  
Old October 20th, 2000, 04:28 AM
dragos dragos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 27 dragos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Supposing in the navigation frame you have a form frm1 and a button like this:
<input type=button name=btn1 value="Click Me" onclick="javascript:clickMe()">
In the same frame, inside the head tag, place a script tag which must contain the following function:
function clickMe(){
top.navigation.document.frm1.submit();
top.body.document.frm2.submit();
}
where frm2 is the form from the body frame. If your buttons do nothing more than changing color dynamically on client-side
then clickMe function should look like:
function clickMe(color){
top.navigation.document.style.backgroundColor = color;
top.body.document.style.backgroundColor = color;
}

Have fun,
Dragos

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > change of frames


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 6 hosted by Hostway
Stay green...Green IT