S
Steven
I have a page(pg1) which contains a select list (list1) in a
form(form1) and an iframe(frame1), in this iframe is a page(pg2) with
another select list(list2) in a form(form2) and I transfer the
contents of list2 to list 1 as follows
function transfer(){
for (var i=0; i<document.form2.list2.length; i++){
var cf=document.form2.list2;
addOption(parent.document.form1.list1, document.form2.list2.value,
document.form2.list2.value);
}
}
function addOption(selectbox,text,value ){
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
Now this works ok BUT my problem is this stops working when I display
pg1 from inside another iframe(frameA)
The error is in parent.document.form1.list1 is null or not an object,
how do I get access to list1 in this situation
form(form1) and an iframe(frame1), in this iframe is a page(pg2) with
another select list(list2) in a form(form2) and I transfer the
contents of list2 to list 1 as follows
function transfer(){
for (var i=0; i<document.form2.list2.length; i++){
var cf=document.form2.list2;
addOption(parent.document.form1.list1, document.form2.list2.value,
document.form2.list2.value);
}
}
function addOption(selectbox,text,value ){
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
Now this works ok BUT my problem is this stops working when I display
pg1 from inside another iframe(frameA)
The error is in parent.document.form1.list1 is null or not an object,
how do I get access to list1 in this situation