Passing objects in javascript
<p>I want to pass an object in javascript. But i am getting an error <code>javascript:callbackCredits(1,dotsContainer_credits); is undefined</code></p>

<p>My code is as follows:</p>

<pre><code>var dotSlideCredits = {
    show : 3,                       
    width : 430,  
    functionName : "callbackCredits",       
    title: "title",
    itemId: "#s_credit"
}

var test = {
     data[]
}

$(document).ready(function(){
   dynamicList(dotSlideCredits);
}

 function dynamicList(dotSlide){
            var divItems = "dotsContainer_"+dotSlide.title;
        test.data.push({title: dotSlide.title+[i], callBack:  "javascript:"+dotSlide.functionName+"("+i+","+divItems+");"});
 }


 function callbackCredits(current, container){
    var prev = $("#previousCredit").val();
    slideShow(current, prev, container);       
    $("#previousCredit").attr("value", current);
 }
</code></pre>
