ניסיתי לעשות משהו דומה , שלא ממש הלך :
PHP קוד:
<html>
<head>
</head>
<body>
<div id="linkid" onclick="doit();">
s
</div>
<script type="text/javascript">
(function(window){
var mine = {
doit : function ( ){
alert();
}
}
window.mine;
})(window);
</script>
</body>
</html>
אני מפספס פה משהו?