title: "Expected ]" error while passing an object as parameter to js function
body: <p>I am trying to pass an object as parameter to the javascript function as:</p>
  
  <pre><code>    .html('&lt;span class="link" onclick="javascript:ShowEventDetails(' + event + ',' 
      + event.Id + ',' + event.Name + ',' + view + ')"&gt;' + event.title 
  + '&lt;/span&gt;')
  </code></pre>
  
  <p>In the above js, the <code>event</code> and <code>view</code> are objects from the jquery calendar <code>Full Calendar</code>, which i am passing to call a js function.</p>
  
  <p>It throws an error, <code>Expected ']'</code>. What may be problem or how to pass an object as above?</p>
  
  <p>It shows <code>"javascript:ShowEditEventDetails([object Object],1,'Name',[object Object])"</code> while looking in firebug.</p>