View Full Version : How to get back the vanished body-content of "welcome-file"

7 Jul 2010, 12:33 AM
Moin moin,

my default page to serve is "login.html":

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="login.css">
<link rel="stylesheet" type="text/css" href="css/gxt-all.css" />
<script type="text/javascript" language="javascript" src="login/login.nocache.js"></script>
<table width="100%" height="100%">
<td align="center" style="font-weight:bold; font-family:Arial; font-size:14px; vertical-align: middle"> please wait...<td>

The text "pleas wait..." will be displayed while the js-file in the header is loading.
After loading-process, the body will be replaced with the new js-content or the old content is shrinked
to bottom, right???

The js-file (login.nocache.js) contains the sourcecode.
My current java-code calls a new url in the same window:

Window.open(url, "_self", "");

But this cause of course a change in the URL-input-area of the browser!!!
I want to prevent a change in the URL-input-area of the browser, because my application run in the index.html of the apache webServer!!!:

<frameset cols="100%">
<frame src="http://url123123.com/Login">
<body>alternative content</body>

The URL http://url123123.com/Login points to my login.html.
My intention is to hide all URL-actions/changes to the user.

So i`m looking for an alternative solution instead of "Window.open(...)".
I expected something like this:

DOM.getElementById("contentFrame").setAttribute("src", url);

I added an iframe into my login.html with the id "contentFrame" with an empty src-attribute.
This solution works but i can`t see the iframe with the new content.
I guess the iframe is shrinked under the js-content (my login-application)...

How can i expand the iframe? Or is there a better solution?


Colin Alworth
7 Jul 2010, 1:50 PM
It appears that all your GWT app does is to navigate between other existing html, server generated pages. Why are you using GWT (and GXT) for this? A proper GWT app also has no url transitions, as the compiled javascript generates all content.

I'm not totally clear on what you are even asking. You create a frameset with a frame in it, then talk about resizing the iframe (which is not a frame, and does not need a frameset).

Look into the GWT classes for IFrameElement and Frame/FrameElement for how to manipulate these objects in GWT - but note that nothing you have posted has anything at all to do with GXT.