Error: "missing } in XML expression"
<p>my date time picker JavaScript giving the following error ...please resolve my problem
following is my code</p>

<p>// JavaScript File</p>

<pre><code>function SetDate(dateValue) {
   // retrieve from the querystring the value of the Ctl param,
   // that is the name of the input control on the parent form
   // that the user want to set with the clicked date
   ctl = window.location.search.substr(1).substring(4);
   // set the value of that control with the passed date
   thisForm = window.opener.document.forms[0].elements[ctl].value = dateValue;
   // close this popup
   self.close();    
}
</code></pre>

<p>In Mozilla error console it gives the following error please have a glance on it.</p>

<blockquote>
  <p>Error: missing } in XML expression<br>
  Source File: <a href="http://localhost:1046/PlacementManager/Scripts/DatePicker.js" rel="nofollow">http://localhost:1046/PlacementManager/Scripts/DatePicker.js</a>
  Line: 8, Column: 57<br>
  Source Code:
        ctl = window.location.search.substr(1).substring(4); </p>
</blockquote>
