-
FEATURED COMPONENTS
First time here? Check out the FAQ!
In ZK framework, inside zul file i want to call javascript function but it does not happens.
<a label="Click" onClick="popUp();">
I have that popUp() function also. But when I click on
<script type="text/javascript">
function createPopUp(url)
{
var w = 600;
var h = 500;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
window.open(url,'name','scrollbars=yes,width='+w+', height='+h+', top='+top+', left='+left);
}
</script>
But when I click on that link it dispalys following error:
Sourced file: inline evaluation of: `` popUp();'' :
Command not found: popUp() : at Line: 13 :
in file: inline evaluation of: `` popUp();'' : popUp ( )
You can call like this
<a label="Click" xmlns:w="http://www.zkoss.org/2005/zk/client" w:onClick="createPopUp('http://www.someUrl.com');"/>
Asked: 2013-11-06 15:37:06 +0800
Seen: 81 times
Last updated: Nov 07 '13