PDA

View Full Version : Desktop Window Url Javascript not executing



BIGANDYT
18 Aug 2009, 3:46 PM
Hi guys i have a window that is loading a url to a page that contains javascript, the issue im having is that the javascript doesnt seem to be executing. Ive seen posts helping for ext js talking about the autoloader etc but i was wondering if someone could help me get this working in GWT 2.0,

Cheers

Andy

BIGANDYT
20 Aug 2009, 1:28 PM
anyone had a chance to look at this, left it a few days, and im still stuck with this one, id appreciate any help people can give, even if its just to further reading

yuriy128
20 Aug 2009, 4:00 PM
Can you give us some more information on what exactly you are trying to do?

The easy way to show a loading screen is how extjs demo's do it:


<style>
#loading {
position: absolute;
left: 45%;
top: 40%;
margin-left: -45px;
padding: 2px;
z-index: 20001;
height: auto;
border: 1px solid #ccc;
}

#loading a {
color: #225588;
}

#loading .loading-indicator {
background: white;
color: #444;
font: bold 13px tahoma, arial, helvetica;
padding: 10px;
margin: 0;
height: auto;
}

#loading .loading-indicator img {
margin-right:8px;
float:left;
vertical-align:top;
}

#loading-msg {
font: normal 10px arial, tahoma, sans-serif;
}


</style>
</head>
<body style="overflow: hidden">

<div id="loading">
<div class="loading-indicator">
<img src="images/default/shared/large-loading.gif" width="32" height="32"/>Ext GWT 1.2.4<a href="http://extjs.com"></a><br />
<span id="loading-msg">Loading demo...</span>
</div>
</div>

<script language='javascript' src='com.extjs.gxt.samples.explorer.Explorer.nocache.js'></script>
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
</body>
</html>and then in code on module load have:



DOM.setInnerHTML(RootPanel.get("loading").getElement(),"")
basically, you are setting div tag "loading" to empty.

Arno.Nyhm
21 Aug 2009, 2:38 AM
i think he mean loading some page into a iframe.

but without sample code what you are doing it is not possible to give an answer...

BIGANDYT
21 Aug 2009, 4:40 AM
its pretty simple:

Window w = new Window();
w.setUrl("www.google.com");

if the url i point to has any javascript in it, like for example an onclick on a image, then the javascript doesnt execute.

BIGANDYT
23 Aug 2009, 1:44 PM
still no replies to this? it cant be that difficult right? someone must know this?