Buenas,
Tengo un problem´n con el calendario a la hora de implementarlo en una aplicación en JSP.
La cosa es que me dice que no encuentra la función Calendar y no sé porqué.
He intentado linkar en todos los lugares posibles y aún así nada. Hasta le he copiado el código a pelo para ver si así iba pero no...
Porfavor ayudadme....
Os pongo el código, aúnque advierto que es casi indescifrable:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/webface" prefix="wf" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<% /* %><HTML><HEAD>
<link rel="stylesheet" type="text/css" media="all" href="../../../jscalendar-1.0/calendar-blue.css" title="win2k-cold-1" />
<!--Hoja de estilos del calendario -->
<!-- librería principal del calendario -->
<script type="text/javascript" src="../../../jscalendar-1.0/calendar.js"></script>
<!-- librería para cargar el lenguaje deseado -->
<script type="text/javascript" src="../../../jscalendar-1.0/lang/calendar-es.js"></script>
<!-- librería que declara la función Calendar.setup, que ayuda a generar un calendario en unas pocas líneas de código -->
<script type="text/javascript" src="../../../jscalendar-1.0/calendar-setup.js"></script>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="GENERATOR" content="WebFacing - WebSphere Development Studio Client for iSeries V5.1.2.2 on Mon Apr 25 17:27:25 CEST 2005">
</HEAD><BODY>
<% */ %>
<%@ page import="com.ibm.as400ad.webfacing.runtime.view.Dis playAttributeBean,com.ibm.as400ad.webfacing.runtim e.dhtmlview.IHTMLStringTransforms" %>
<jsp:useBean id='PANTA03' scope='request' type="com.ibm.as400ad.webfacing.runtime.view.IDisp layRecord" />
<% final int QUOTED_TRANSFORM = IHTMLStringTransforms.QUOTED_STRING_TRANSFORM;
final int UNQUOTED_TRANSFORM = IHTMLStringTransforms.UNQUOTED_STRING_TRANSFORM;
final String zOrder = Integer.toString(PANTA03.getDisplayZIndex());
final boolean isProtected=PANTA03.isProtected();
int lastCol; /* %><TABLE><TBODY><% */ %>
<TR id="l<%=zOrder%>r12" class="trStyle">
<% lastCol = 0; %>
<TD colspan=12> </TD>
<TD NOWRAP colspan=4 rowspan=1><span id='l<%=zOrder%>_PANTA03$Unnamed19' class="wf_default wf_field" onClick="<wf:js function="setCursor"/>(12, 13,null,'<%=(String)session.getAttribute("UniqueId ")%>');" >URL:</span></TD><% lastCol=16; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=60 rowspan=1><INPUT <%if (isProtected || PANTA03.evaluateIndicatorExpression(" 55 O 69")) {%> readonly tabindex=-1 <%}%> id="l<%=zOrder%>_PANTA03$WWURL" previousValue="<%=PANTA03.getFieldValueWithTransfo rm("WWURL", QUOTED_TRANSFORM)%>" <%{DisplayAttributeBean dsplAttrBean = new DisplayAttributeBean(); dsplAttrBean.setProtectIndExpr(isProtected?"":" 55 O 69"); dsplAttrBean.setUnderlineIndExpr("N55"); %> class="wf_hi <%=PANTA03.evaluateStyleClass(dsplAttrBean)%>" <%}%> VALUE="<%=PANTA03.getFieldValueWithTransform("WWUR L", QUOTED_TRANSFORM)%>" SIZE=60 MAXLENGTH=60 ></TD><% lastCol=77; %>
</TR>
<TR id="l<%=zOrder%>r13" class="trStyle"><TD> </TD></TR>
<TR id="l<%=zOrder%>r14" class="trStyle">
<% lastCol = 0; %>
<TD colspan=6> </TD>
<TD NOWRAP colspan=10 rowspan=1><span id='l<%=zOrder%>_PANTA03$Unnamed20' class="wf_default wf_field" onClick="<wf:js function="setCursor"/>(14, 7,null,'<%=(String)session.getAttribute("UniqueId" )%>');" >Actividad:</span></TD><% lastCol=16; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=4 rowspan=1><INPUT <%if (isProtected || PANTA03.evaluateIndicatorExpression(" 55 O 69")) {%> readonly tabindex=-1 <%}%> id="l<%=zOrder%>_PANTA03$WWSEC" previousValue="<%=PANTA03.getFieldValueWithTransfo rm("WWSEC", QUOTED_TRANSFORM)%>" <%{DisplayAttributeBean dsplAttrBean = new DisplayAttributeBean(); dsplAttrBean.setProtectIndExpr(isProtected?"":" 55 O 69"); dsplAttrBean.setUnderlineIndExpr("N55"); %> class="wf_hi <%=PANTA03.evaluateStyleClass(dsplAttrBean)%>" <%}%> VALUE="<%=PANTA03.getFieldValueWithTransform("WWSE C", QUOTED_TRANSFORM)%>" SIZE=4 MAXLENGTH=4 STYLE="width: auto" ></TD><% lastCol=21; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=30 rowspan=1><span id='l<%=zOrder%>_PANTA03$WWNSEC' class="wf_hi wf_default wf_field" ><%=PANTA03.getFieldValueWithTransform("WWNSEC", UNQUOTED_TRANSFORM)%></span></TD><% lastCol=52; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=18 rowspan=1><span id='l<%=zOrder%>_PANTA03$Unnamed21' class="wf_default wf_field" onClick="<wf:js function="setCursor"/>(14, 54,null,'<%=(String)session.getAttribute("UniqueId ")%>');" >Fecha Nac./Creac.:</span></TD><% lastCol=71; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=6 rowspan=1><INPUT <%if (isProtected || PANTA03.evaluateIndicatorExpression(" 55 O 69")) {%> readonly tabindex=-1 <%}%> id="l<%=zOrder%>_PANTA03$WWFNA" previousValue="<%=PANTA03.getFieldValueWithTransfo rm("WWFNA", QUOTED_TRANSFORM)%>" <%{DisplayAttributeBean dsplAttrBean = new DisplayAttributeBean(); dsplAttrBean.setColSeparatorsIndExpr("N55"); dsplAttrBean.setProtectIndExpr(isProtected?"":" 55 O 69"); %> class="wf_hi wf_ul wf_rightJustify <%=PANTA03.evaluateStyleClass(dsplAttrBean)%>" <%}%> VALUE="<%=PANTA03.getFieldValueWithTransform("WWFN A", QUOTED_TRANSFORM)%>" SIZE=6 MAXLENGTH=6 ></TD><% lastCol=78; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=1 rowspan=1><SCRIPT LANGUAJE="JavaScript" src="Calendar.js"></SCRIPT>
<!-- script que define y configura el calendario-->
<A HREF="#" NAME="WWFNA" ID="WWFNA">
<script languaje="javascript">
Calendar.setup({
inputField : "PANTA03$WWFNA", // id del campo de texto
ifFormat : "%d%m%y", // formato de la fecha, cuando se escriba en el campo de texto
button : "boton" // el id del botón que lanzará el calendario
});
</script>
<img src="../pruebas%20calendario%20webfacing/images/IBM/Icono_Calendar.gif" id="boton" width=24 height=22 border=0>
</A>
</TD><% lastCol=80; %>
</tr>
<!-- <SCRIPT LANGUAJE="JavaScript">
/*var cal1 = new CalendarPopup();*/
</SCRIPT>
<A HREF="#" onClick="cal1.select(l1_PANTA03$WWFNA,'WWFNA','ddm myy'); return false;"
NAME= "WWFNA" ID="WWFNA">
<img src="images/IBM/Icono_Calendar.gif" width=24 height=22 border=0>
</A>
</TD><%/* lastCol=80; */%>
</TR> -->
<TR id="l<%=zOrder%>r15" class="trStyle">
<% lastCol = 0; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=15 rowspan=1><span id='l<%=zOrder%>_PANTA03$Unnamed22' class="wf_default wf_field" onClick="<wf:js function="setCursor"/>(15, 2,null,'<%=(String)session.getAttribute("UniqueId" )%>');" >Grupo Empresas:</span></TD><% lastCol=16; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=5 rowspan=1><INPUT <%if (isProtected || PANTA03.evaluateIndicatorExpression(" 69")) {%> readonly tabindex=-1 <%}%> id="l<%=zOrder%>_PANTA03$WWGRE" previousValue="<%=PANTA03.getFieldValueWithTransfo rm("WWGRE", QUOTED_TRANSFORM)%>" <%{DisplayAttributeBean dsplAttrBean = new DisplayAttributeBean(); dsplAttrBean.setProtectIndExpr(isProtected?"":" 69"); %> class="wf_hi wf_ul <%=PANTA03.evaluateStyleClass(dsplAttrBean)%>" <%}%> VALUE="<%=PANTA03.getFieldValueWithTransform("WWGR E", QUOTED_TRANSFORM)%>" SIZE=5 MAXLENGTH=5 STYLE="width: auto" ></TD><% lastCol=22; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=30 rowspan=1><span id='l<%=zOrder%>_PANTA03$WWNGRE' class="wf_hi wf_default wf_field" ><%=PANTA03.getFieldValueWithTransform("WWNGRE", UNQUOTED_TRANSFORM)%></span></TD><% lastCol=53; %>
</TR>
<TR id="l<%=zOrder%>r16" class="trStyle"><TD> </TD></TR>
<TR id="l<%=zOrder%>r17" class="trStyle"><TD> </TD></TR>
<TR id="l<%=zOrder%>r18" class="trStyle"><TD> </TD></TR>
<TR id="l<%=zOrder%>r19" class="trStyle">
<% lastCol = 0; %>
<TD NOWRAP colspan=16 rowspan=1><span id='l<%=zOrder%>_PANTA03$Unnamed23' class="wf_default wf_field" onClick="<wf:js function="setCursor"/>(19, 1,null,'<%=(String)session.getAttribute("UniqueId" )%>');" >Vol.Facturación:</span></TD><% lastCol=16; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=14 rowspan=1><INPUT <%if (isProtected || PANTA03.evaluateIndicatorExpression(" 69")) {%> readonly tabindex=-1 <%}%> id="l<%=zOrder%>_PANTA03$WWMIF" previousValue="<%=PANTA03.getFieldValueWithTransfo rm("WWMIF", QUOTED_TRANSFORM)%>" <%{DisplayAttributeBean dsplAttrBean = new DisplayAttributeBean(); dsplAttrBean.setProtectIndExpr(isProtected?"":" 69"); %> class="wf_hi wf_cs wf_ul wf_rightJustify <%=PANTA03.evaluateStyleClass(dsplAttrBean)%>" <%}%> VALUE="<%=PANTA03.getFieldValueWithTransform("WWMI F", QUOTED_TRANSFORM)%>" SIZE=14 MAXLENGTH=14 ></TD><% lastCol=31; %>
<TD colspan=6> </TD>
<TD NOWRAP colspan=4 rowspan=1><span id='l<%=zOrder%>_PANTA03$Unnamed24' class="wf_default wf_field" onClick="<wf:js function="setCursor"/>(19, 38,null,'<%=(String)session.getAttribute("UniqueId ")%>');" >Año:</span></TD><% lastCol=41; %>
<TD colspan=1> </TD>
<TD NOWRAP colspan=4 rowspan=1><INPUT <%if (isProtected || PANTA03.evaluateIndicatorExpression(" 69")) {%> readonly tabindex=-1 <%}%> id="l<%=zOrder%>_PANTA03$WWA_aanbF" previousValue="<%=PANTA03.getFieldValueWithTransfo rm("WWA_aanbF", QUOTED_TRANSFORM)%>" <%{DisplayAttributeBean dsplAttrBean = new DisplayAttributeBean(); dsplAttrBean.setProtectIndExpr(isProtected?"":" 69"); %> class="wf_hi wf_cs wf_ul wf_rightJustify <%=PANTA03.evaluateStyleClass(dsplAttrBean)%>" <%}%> VALUE="<%=PANTA03.getFieldValueWithTransform("WWA_ aanbF", QUOTED_TRANSFORM)%>" SIZE=4 MAXLENGTH=4 STYLE="width: auto" ></TD><% lastCol=46; %>
</TR>
<% /* %></TBODY></TABLE>
</BODY>
</HTML><% */ %>
No está todo el código pero una parte si. No me cojía todo...
Graciñas