This page shows data with an mySQL select based on a date. The default date is 'today' (and works fine) but the user can change the date via a pop up calendar. I need to have the page reload and execute the SQL select using the new date. The form piece of the script is:
<form method="POST" onsubmit="schedulepage.html?asof=<? print $asof ?>">
<INPUT name=asof value="<? print $asof; ?>" type="hidden">
<font size="1">
<INPUT onclick="fPopCalendar(asof,asof); return false;" type=submit id=button1 name=button1 value=" ? " ; ></font></td>
</form>
I hoped that by making the " ? " type=submit the calendar would popup (that's the function shown) and then reload itself passing the chosen date (asof). When I click the calendar and select a date nothing happens. I'm sure this is pretty basic but I searched Tek-Tips and didn't find the answer.
I'm using HTML, PHP, mySQL and JavaScript.
I just tried removing the 'return=false' as an experiment (I really don't understand its' purpose yet). The page redisplayed in a new window with the calendar behind it. I closed the window and picked a date on the calendar. Another window popped up again this time showing the new date with the correct data displayed! It seems the problem is there somewhere so maybe someone can pin point it.
Thanks to all for their help.
Scott
<form method="POST" onsubmit="schedulepage.html?asof=<? print $asof ?>">
<INPUT name=asof value="<? print $asof; ?>" type="hidden">
<font size="1">
<INPUT onclick="fPopCalendar(asof,asof); return false;" type=submit id=button1 name=button1 value=" ? " ; ></font></td>
</form>
I hoped that by making the " ? " type=submit the calendar would popup (that's the function shown) and then reload itself passing the chosen date (asof). When I click the calendar and select a date nothing happens. I'm sure this is pretty basic but I searched Tek-Tips and didn't find the answer.
I'm using HTML, PHP, mySQL and JavaScript.
I just tried removing the 'return=false' as an experiment (I really don't understand its' purpose yet). The page redisplayed in a new window with the calendar behind it. I closed the window and picked a date on the calendar. Another window popped up again this time showing the new date with the correct data displayed! It seems the problem is there somewhere so maybe someone can pin point it.
Thanks to all for their help.
Scott