passing javascript value into form action
<p>I have the form:</p>

<pre><code>&lt;form name="form1" method="post" action="test.php?date=javascript:this.form.date2.value"&gt;
</code></pre>

<p>I am using a DatetimePicker for PHP like below:</p>

<pre><code>        $myCalendar = new tc_calendar("date2");
        $myCalendar-&gt;setIcon("calendar/images/iconCalendar.gif");
        $myCalendar-&gt;setDate(date('d'), date('m'), date('Y'));
        $myCalendar-&gt;setPath("calendar/");
        $myCalendar-&gt;setYearInterval(1970, 2020);
        $myCalendar-&gt;dateAllow('2008-05-13', '2015-03-01', false);
        $myCalendar-&gt;startMonday(true);
        $myCalendar-&gt;autoSubmit(true, "form1", "test.php");
        $myCalendar-&gt;autoSubmit(true, "form1");
        $myCalendar-&gt;showWeeks(true);  
        $myCalendar-&gt;writeScript();
</code></pre>

<p>The thing is i cannot pass the date value from datetimepicker into form action where the url is "test.php?=date="</p>

<p>How would this be possible to pass the value of datetimepicker by just clicking on calendar, not using any extra button and using onsubmit event.</p>

<p>After execution the result in URL looks like this:
test.php?date=javascript:this.form.date2.value</p>

<p>Thanks</p>
