SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

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 Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 24th, 2004, 09:20 PM
treeleaf20 treeleaf20 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 161 treeleaf20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Frames and Javascript Question

I have two frames one is called leftFrame and it has a drop down box. When the value in the drop down box changes I want it to display the link in the other frame which is called mainFrame. This is the code I tried to use but it wouldn't work. Can someone PLEASE HELP!!

<form style="margin-top:0pt">
<select onChange="javascript: window.mainFrame.href=this.options[this.selectedIndex].value;">

<option value="#" selected>Choose one</option>
<option value="/health/producer/newsletter/jun04.htm">June, 2004</option>
<option value="/health/producer/newsletter/may04.htm">May, 2004</option>
<option value="/health/producer/newsletter/apr04.htm">April, 2004</option>
<option value="/health/producer/newsletter/mar04.htm">March, 2004</option>
<option value="/health/producer/newsletter/feb04.htm">February, 2004</option>
<option value="/health/producer/newsletter/jan04.htm">January, 2004</option>
<option value="/health/producer/newsletter/dec2003/index.htm">December, 2003</option>
<option value="/health/producer/newsletter/nov03.htm">November, 2003</option>
<option value="/health/producer/newsletter/oct03.htm">October, 2003</option>
<option value="/health/producer/newsletter/sep03.htm">September, 2003</option>
<option value="/health/producer/newsletter/aug03.htm">August, 2003</option>
<option value="/health/producer/newsletter/jun03.htm">June, 2003</option>
<option value="/health/producer/newsletter/may03.htm">May, 2003</option>
</select>
</form>

Reply With Quote
  #2  
Old June 25th, 2004, 11:54 AM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Frames and Javascript Question

just a couple of syntax errors in the onChange code...try this

<select onChange="parent.mainFrame.location.href=this.options[this.selectedIndex].value;">

When dealing with frames you have to reference the parent in order to get access to the frames

Reply With Quote
  #3  
Old June 28th, 2004, 04:41 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Frames and Javascript Question

Thanks

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Frames and Javascript Question


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 1 hosted by Hostway