Hi all
we are now porting the webappplication codes from vj++ to vJ#. In that we are accessing a parent iframe window from its child window ,which was working in vj++.But the same code now ported to vj# seems to be not working.Whether any other things need to work or not.so please provide some ideas to get its parent or its topwindow.
the sample code
DhWindow botomWindow=
this.getWindow().getParent().getParent();DhWindow leftwinindow = botomWindow.getFrame("dleftframe");
DhDocument cachefram=leftwindow.getFrame("cachecolorframe").getDocument();
here i am geeting an iframe window called bottomwindow from the current window,which is a child window of bottom window.
so i want to get the bottomwindow control in the current window(controlframe).
i used the getparent or gettopwindow method too.but seems to getting its own window or frame name only
thanks
kumar

Does Vj# allows to get Parent Window of an Iframe
rico75
Hi,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Before getting into details, here is my understanding about the scenario.
I understand that you are trying to get the Parent IFrameWindow from the current IFramewindow using VJ#.
Application Design is :
Parent.html-> Child.html(IFrame)-> GrandChild.html(IFrame).
Sample code lies in GrandChild.html code base (dll) and you intend to get the Child IFrame Window from GrandChild.html.
For creating child window ,Are you using “DhInlineFrame” which is in com.ms.wfc.html or <IFrame> Tag in HTML
Let me know if I am getting your scenario correctly
Thanks,
Noorul
kfkyle
Hi Praveen,< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
The code this.getWindow ().getParent () is not returning the Parent DhWindow ().So you can use the following work around. It will return the parent IHTMLWindow2 object. For this import following package
import com.ms.wfc.html.om.*;
IHTMLWindow2 win = (IHTMLWindow2)this.getWindowPeer().getParent();
Or if you want DhWindow to be returned you can use the following work around
IHTMLWindow2 win = (IHTMLWindow2)this.getWindowPeer().getParent();
IHTMLDocument2 doc = win.getDocument();
DhDocument Dhdoc = new DhDocument(null, doc, win);
DhWindow Dhwin = Dhdoc.getWindow();
Let us know if you still see any issues.
Thanks,
Noorul Ameen.
Brandon Furtwangler
Hi Noorul,
I tried with your method of getting the parent using the window peer ,its now working.now i am able to get the parent frames.But i dont know ,why it is not returning the parent of a DhWindow instaed of its peer.Any way thanks for ur help for giving these references.This would lot help me.
thanks
Praveen
cool_chandu
Hi ,
ya yours application design was correct and i am accesing such parent window frame only.i am using <iFrame> tag through out in all html files and did not "DhInline frame".In that the child window frame width and height is set to zero,so its invisible.Now want to get the parent Iframe window inorder to access the other iframes window object.
thanks
praveen