I want to declare a object in a js file like: var o = {p:1};
and then create a watch for it in my html file.
<script>
var o = {p:1};
o.watch("p",function (id, oldval, newval)
{
alert(newval);
return newval;
});
o.p=count;
</script>
this code works in my html but if I declare "var o' in my js file it does not work. The reason I want to do that is because a I want to modify the value of my object in my js file and detect it in the html.
<script> tag or in.jsfile is similar. are you adding<script>in.jsfile