I want to set the frame-height to the height of the content in my frame. So 
I can display it in mgwt with normal scrolling behavior.
 
The following code is not working:
in my ViewImpl.java:

constructor:
frame = new Frame(some-url/xyz.html");
frame.getElement().setId("framename");
setFrameSize("framename");

.....
.....

JSNI-method in this class
    public native boolean setFrameSize (String id)
    /*-{
            var newheight;
            var newwidth;
        
            if($doc.getElementById){
                
newheight=$doc.getElementById(id).contentWindow.$doc.body.scrollHeight;
                
newwidth=$doc.getElementById(id).contentWindow.$doc.body.scrollWidth;
            }
        
            $doc.getElementById(id).height= (newheight) + "px";
            $doc.getElementById(id).width= (newwidth) + "px";
            return true;
    }-*/;

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to