|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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> |
|
#2
|
|||
|
|||
|
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).] |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Check Box Determines Which Frame - HELP! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|