Im trying to get some simple javascript working in gwt but keep failing.
The code:
public static native void createWindow() /*-{
var wndRef = $wnd.open('','edit');
var divTag = document.createElement("div");
divTag.id = "div1";
divTag.setAttribute("align","center");
divTag.style.margin = "0px auto";
divTag.innerHTML = "blah blah blah";
wndRef.document.body.appendChild(divTag);
}-*/;
I am trying to open a new window and write content to it
The problem: Currently this code opens a new window but its empty.
How do i write content to it ? am i doing something wrong or am i expecting too much from gwt?
Context: My end goal is to open a new Window and have my form panel and various widgets inserted in to it via java methods.