-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all, I am trying customize the Ace Admin Board theme. the "contentPage" which as a Include component will change when user click the navbar.
the code like this
<navitem label="test" iconSclass="z-icon-angle-double-right">
<attribute name="onClick">
contentPage.setSrc("../View.zul");
</attribute>
</navitem>
then, the view.zul is like this
<zk>
<script type="text/javascript" src="/openlayer/custom/initMap.js"/>
<vlayout apply="test.EditComposer">
<div height="600px" width="100%" id="map_canvas" />
</vlayout></zk>
and the editComposer
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
Clients.evalJavaScript("console.log(\"initMap()\");");
}
the js will log a text like "loaded--JS".
so, which I think the browser console will log like
loaded--JS initMap();
but the browser show like
initMap(); loaded--JS
WHY...? I try every way i can think off. use jq is the same(both document.ready/window load event) any suggestion??
Asked: 2015-01-13 13:39:43 +0800
Seen: 11 times
Last updated: Jan 18 '15