ClientScript.RegisterClientScriptBlock Object error
<p>I have created a variable in Javascript as Global. and I have initialized as object in initialize() function.</p>

<pre><code> var path;
 function initialize() {   
    var polyOptions = { strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }
    path = new google.maps.Polyline(polyOptions);
}

function drawpoly1() { 
path.getPath().push(location);
}
</code></pre>

<p>I am calling this function from .Net through</p>

<p>ClientScript.RegisterClientScriptBlock</p>

<p>Function is called but it shows the error as</p>

<p>Microsoft JScript runtime error: 'path' is null or not an object</p>

<p>Please tell me how to handle this error</p>
