ZIng charts, Javascript and renderPartial

Hi, hope someone can help me out here. I have a widget that produces a chart using Zing. In the widget view is the following.

<script type=“text/javascript”>var jsonWDL=’<?php echo $json; ?>’;</script>

<script type="text/javascript">addLoadEvent(function(){<?php echo $this->onloadFunction; ?>});</script>

<div id="zingDateChartLine"></div>

This chart widget works if it’s called using render but I’m trying to generate it after an ajax comb box selection that in turns calls renderPartial. The ajax call is working as other elements on the partial view get displayed but the chart fails to show. Trying to debug I can see the div gets inserted but there is no script getting inserted at all.

On the renderPartial I have set ProcessOutput=true.

The addLoadEvent is the following which is being registered on the initial actionIndex. Not even the json seems to appear though.

function addLoadEvent(func){

var oldonload=window.onload;

if (typeof window.onload &#33;= 'function'){


} else{


        if (oldonload){