jquery calling a function

Posted by jay on Stack Overflow See other posts from Stack Overflow or by jay
Published on 2010-06-17T12:20:23Z Indexed on 2010/06/17 12:23 UTC
Read the original article Hit count: 263

Filed under:
|
|

Hi,

yet again thanks for looking.

i like to call a function (eg. comment_disp, post_disp or any other i create later on).

i have created a json function with url, fname and id can i use fname as a function name?

// on document ready runs
json('comments.php','comment_disp');
  • url = url to get
  • fname = function
  • name id = post or any other data id.
json = function(url,fname,id){
$.getJSON(url,(fname));
}

comment_disp = function(json){
}

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JSON