Click to See Complete Forum and Search --> : Calendar in the html/jsp script


Rauf
09-15-2003, 11:49 AM
Hi All,

I am new to javascript. I was wondering if someone could point me to the right direction in order to accomplish the following:

1. Make this pop-up calendar (http://javascript.internet.com/calendars/fuushikaden-pop-up-calendar.html OR
http://javascript.internet.com/calendars/popup-date-picker.html), a permanent part of my jsp document (myCalendar.jsp) and allow the user to select a date.

2. Once user selects a date, the jsp document should reload with the following URL:
myCalendar.jsp?myDate=MM-DD-YYYY

Thanks

Rauf
=====
<%@ page import="java.sql.*, java.lang.Object" %>
<%@ page import="java.net.*,java.util.*" %>
<%String sqlDate = request.getParameter("myDate");
out.print(sqlDate);
// query the database using this date.
%>
<html>
<head>
<script language="JavaScript" src="../JS/date-picker.js"></script>
<style>BODY { font-style: verdana }
</style>
<title>This is a title
</title>
</head>
<body bgcolor='lightgrey' >
Calendar ---> Miss. Linda Smith Friday, September 12

<FORM METHOD="POST">
<INPUT TYPE="submit" NAME="week" VALUE=" Week View "/>

<table border="1">

<TR>
<TD ROWSPAN="2" ALIGN="RIGHT" >
<font size="8">8
</font>
</TD>
<TD ALIGN="left" >
<font size="3">00
</font>
</TD>
<TD ALIGN="left" >
<input type="text" size="62" name="Arrayxy" value='Y'/>
</TD>

</TR>

<TR>
<TD ALIGN="right">
</TD>
<TD ALIGN="left">
<input type="text" name="Array118" size="62" value='X'/>
</TD>
</TR>
</table>
<INPUT TYPE="submit" NAME="save" VALUE="Save changes!"/>
<INPUT TYPE="submit" NAME="mainmenu" VALUE="Return to Main Menu"/>
<INPUT TYPE="submit" NAME="logout" VALUE="Logout"/>
</form>
</body>
</html>