jquery - Passing Objects as Parameters in javascript function -
i want pass objects parameters javascript function ,
i had tried following,actually iam calling function function in innerhtml..
var tempobj={ result:results, jsobj:jsobj } str +='<input type="button" onclick="buildcstrwisechart('+tempobj+')" value="view" class="btn btn-info">';
but didnt works me iam getting error like..
syntaxerror: missing ] after element list [break on error] buildcstrwisechart([object object])
can 1 in this..
you treating object if string. that's error.
is tempobj
global variable? if so,
str +='<input type="button" onclick="buildcstrwisechart(tempobj)" value="view" class="btn btn-info">';`
Comments
Post a Comment