How may I return a value to an input field using JQuery Datepicker populated in a JavaScript pop-up?
<p>I have implemented a <a href="https://jqueryui.com/datepicker/#show-week" rel="nofollow">JQuery DatePicker</a> as an inline calendar, ie. without the associated text field. This DatePicker should be automately shown in a pop up window when user clicks on a calendar .gif and return the value in format <code>YYYYMMDD</code> to an input field on the associated JSP page.</p>

<p>I've managed to generate the pop up after clicking the calendar image and also to implement the calendar in the pop up and generate the date value in the correct format. However, I'm not sure about how to return this value to the JSP page.</p>

<p>JSP page:</p>

<p><code>&lt;html:img src="/calendarimg/cal.gif" onclick="popUp('updIntroDate');"/&gt;</code></p>

<p>POP up window:</p>

<pre><code>var windowObjectReference;
var strWindowFeatures = "menubar=no,location=yes,resizable=no,scrollbar=no,status=yes,
 location=no,toolbar=no,height=200,width=200";

function popUp()    {
   windowObjetReference = window.open("datepickercalendar.html", "DatePicker",
       strWindowFeatures);
 }
</code></pre>

<p>The DatePicker function:</p>

<pre><code>&lt;script&gt;
  $(function DatePicker(updIntroDate) {
  $("#datepicker").datepicker({
    dateFormat: 'yymmdd',
    onSelect: function(v)   {
        //var dateObject = $(this).datepicker('getDate');
        alert(v);
        },
    showWeek: true,
    firstDay: 1,
});
});
&lt;/script&gt;
&lt;div id=datepicker&gt;&lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>The alert I've put in the Date-picker function shows the date in the correct format when clicking any date in the calendar. How may I send this value back, through the popup function back to my JSP page and populate the input field there?</p>