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 April 12th, 2000, 09:39 AM
Paul Reid Paul Reid is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Aberdeen
Posts: 3 Paul Reid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,

I have a simple pull down menu which displays a requested page in a frame .
I also have 2 radio buttons which should let the user select which frame to
display the page. I presume I need 'parent.radio1.location' instead of
'parent.framename.location' but I can't access the radio1 value correctly.

Many thanks for your help.

Paul

<SCRIPT LANGUAGE="JavaScript1.1">
function team() {
var list = document.forms[0].select
parent.framename.location = list.options[list.selectedIndex].value
}
</SCRIPT>

</HEAD>

<BODY>

<FORM>
<SELECT NAME="select" onChange="team()">
<OPTION SELECTED VALUE="blank.htm">--Select Team--

<OPTION VALUE="page1.htm"> Page 1

<OPTION VALUE="page2.htm"> Page 2

</SELECT>

<INPUT TYPE="RADIO" NAME="radio1" VALUE="left" CHECKED> Left Frame
<INPUT TYPE="RADIO" NAME="radio1" VALUE="right"> Right Frame

</FORM>

</BODY>
</HTML>


Reply With Quote
  #2  
Old April 13th, 2000, 04:49 PM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Try this one:
http://www.wsabstract.com/script/sc...combomain.shtml

for the checkbox thing just use a variable for the frame name..something like:

framename = document.formname.checkboxname.value;
parent.framename.location.href='page.html';

Spookster

[This message has been edited by Spookster (edited April 13, 2000).]

Reply With Quote
  #3  
Old April 14th, 2000, 05:28 AM
Paul Reid Paul Reid is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Aberdeen
Posts: 3 Paul Reid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for help however....

Tried it that way and took out alot of what I didn't think I need. But get this error -

parent.targetframe has no properties

Here is the code I'm using:

<form name="choice">
<select name="whichpage" size=1>
<option value="page1.htm">Redz</option>
<option value="page2.htm">Gers</option>
</select>

<input type="radio" name="radio1" value="left" checked> Left Frame
<input type="radio" name="radio1" value="right"> Right Frame

<input type="button" value="Go" onClick="doit()">

</form>

<script language="javascript">

function doit(){

var thebox=document.choice

var targetframe=thebox.radio1.value;

parent.targetframe.location=thebox.whichpage.options[thebox.whichpage.selectedIndex].value
}

</script>


I'm obviously still not accessing the value in the radio button correctly. I look forward to your help.

Many thanks

Paul

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Check Box Determines Which Frame - HELP!


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