Call javascript function from call? -
this question has reply here:
calling javascript function (in original function) called function? 2 answershow create when create call
client.notification("test", "test", function(){ alert("hello world"); });
i can phone call stuff within function(){....} in "client.notification"?
ex.
var client = ({"notification" : function(a,b,c){ document.write(a + b); if ( .... ) { //call alert stuff function "c" } });
i've tried this:
$('#notification').click(eval(c));
without luck
try this:
var client = ({"notification" : function(a,b,c){ alert('inside of notification'); c.call(); // or `c()` }}); client.notification("test", "test", function(){ alert("inside of callback"); });
javascript
No comments:
Post a Comment