mail2yogi1
asked on
how to use createElement(); In child window for opener window?
Dear Friends,
I have one dropdown list box in parent window. I want to
insert options into that from child window.
I am using window.open() for opening child window.
I can able do it in parent window with
/************************* ********** *********
xx = document.createElement("OP TION");
xx.text="yogi"
xx.value="yogi"
document.frmName.listName. add(xx);
/************************* ********** *********
But Please Tell me how it is posibile from child window?
I tried with opener.createElement("OPTI ON"); It is not allowing..........
IN SHORT
how to use createElement(); In child window for opener
window?
I have one dropdown list box in parent window. I want to
insert options into that from child window.
I am using window.open() for opening child window.
I can able do it in parent window with
/*************************
xx = document.createElement("OP
xx.text="yogi"
xx.value="yogi"
document.frmName.listName.
/*************************
But Please Tell me how it is posibile from child window?
I tried with opener.createElement("OPTI
IN SHORT
how to use createElement(); In child window for opener
window?
oops ... try this:
if ( self.opener && !self.opener.closed )
self.opener.document.frmNa me.listNam e.add(xx);
if ( self.opener && !self.opener.closed )
self.opener.document.frmNa
and if that doesn't work, then do this ...
first, give the parent window a name, so in the parent window, do this:
<BODY onLoad='self.name="thePare nt";'>
then in the child, do this:
if ( !self.opener )
self.opener = window.open("","theParent" ); // get handle to parent
if ( self.opener && !self.opener.closed )
self.opener.document.frmNa me.listNam e.add(xx);
first, give the parent window a name, so in the parent window, do this:
<BODY onLoad='self.name="thePare
then in the child, do this:
if ( !self.opener )
self.opener = window.open("","theParent"
if ( self.opener && !self.opener.closed )
self.opener.document.frmNa
ASKER
Actually I am dynamically creating dropdown list box in parent window. and in child window I want to add elements in to it. So I must have to use createElement function.
So How to use it. This is same question as above. In other way.
Thanks,
So How to use it. This is same question as above. In other way.
Thanks,
In parent write the function:
<script>
function adder(t, v) {
xx = document.createElement("OP TION");
xx.text=t;
xx.value=v;
document.frmName.listName. add(xx);
}
</script>
In child call this:
opener.adder("yogi", "yogi");
<script>
function adder(t, v) {
xx = document.createElement("OP
xx.text=t;
xx.value=v;
document.frmName.listName.
}
</script>
In child call this:
opener.adder("yogi", "yogi");
ASKER
Hey noboday knows to use createElement().........
Its very Urgent ....
Yogi
Its very Urgent ....
Yogi
what is the error?
ASKER
Dear knightEknight Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, knightEknight for helping in time.
opener.document.frmName.li