i have started a music database with own templates, like itunes layout, wmp and so forth... anyways one of the things im trying to do is an options menu. and i want to make it so that you have a list of items, like a list you get from a form. which then updates another list on the side of it so that you are then finally able to open up a certain section. but what i was doing was create three iframes, with three functions (well more, but just for this lets say three) and each script updates each time something is clicked. so the script starts of writing <html><head><...> then the variable is something selected from the list. and i just cant get them to interact with each other.
just a quick mock up of what i have tried to get to work, but it just doesnt work (this has other random things which just let me see different things im trying to do in the future:
just a quick mock up of what i have tried to get to work, but it just doesnt work (this has other random things which just let me see different things im trying to do in the future:
<html>
<head>
<title>Selection Thingy</title>
<script type='text/javascript'>
one=["one","uno","un","1"];
two=["two","dos","two in french","2"];
uno=["uno"];
un=["un"];
function firstbox(choice){
var s='<html><head></head><body>'
s+='<select size="7" name="select" onChange="secondbox(this.selectedIndex);" style="font-size:20px; width:100%; ">'
for(c=0;c < 4;c++)
s+='<option>'+one+'</option>'
s+='</select></form></body></html>'
with(document.getElementById('firstbox').contentDocument){
open();
write(s);
close();
}
}
function secondbox(choice){
if(choice==1){selection=one;}
if(choice==2){selection=two;}
var s="<html><head></head><body>";
s+="<form><select size='"+selection.length+"' >";
for(c=0;c<4;c++)
s+="<option>"+selection[c]+"</option>";
s+="</select></form></body></html>";
with(document.getElementById('secondbox').contentDocument){
open();
write(s);
close();
}
}
function toload(){
firstbox();
secondbox();
}
</script>
</head>
<body onload="javascript:toload()"><table width="1024" border="3">
<tr>
<td width="333"><iframe style="width:100%; height:300px" id="firstbox"></iframe></td>
<td width="332"><iframe style="width:100%; height:300px" id="secondbox"></iframe></td>
<td width="333"> </td>
</tr>
</table>
<table width="1024" border="3">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>