Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/06/2011, 06:45
jorsotmar
 
Fecha de Ingreso: mayo-2011
Ubicación: Sevilla
Mensajes: 9
Antigüedad: 12 años, 11 meses
Puntos: 0
Colocar Calendarios JavaScript en JSP

Os cuento mi problema. Como puedo poner dos calendarios js en un mismo jsp?
si pongo uno funciona a la perfección pero si coloco dos solo funciona uno os pongo el código:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="style/style.css"/>
<title>I.E.S Guadalquivir - Campus Virtual</title>
<style type="text/css">@import url("style/calendar-green.css");</style>
<script type="text/javascript" src="javascript/calendar.js"></script>
<script type="text/javascript" src="javascript/calendar-es.js"></script>
<script type="text/javascript" src="javascript/calendar-setup.js"></script>
<script type="text/javascript">
window.onload = function() {
Calendar.setup({
inputField: "fechaIni",
ifFormat: "%d/%m/%Y",
button: "selector"
});
}
</script>
<script type="text/javascript">
window.onload = function() {
Calendar.setup({
inputField: "fechaFin",
ifFormat: "%d/%m/%Y",
button: "select"
});
}
</script>
</head>
<body>
<div id="contenedor">
<%@ include file="cabecera.html" %>
<%@ include file="menu.jsp" %>
<div id="contenido">
<div id="principal">
<%
String nombre=request.getParameter("nombre");
if(nombre==null){
%>
<form action="FrontController?res=nuevoEvento.jsp" method="post">
<fieldset>
<legend>Nuevo Evento</legend>
<table>
<tr>
<td><label for="nombre">Nombre</label></td>
<td><input name="nombre" value="" size="25" type="text"></td>

</tr>
<tr>
<td><label for="descripcion">Descripcion:</label></td>
<td><textarea name="descripcion" cols="50" rows="10"></textarea></td>
</tr>
<tr>
<td><label for="fInicio">Fecha Inicio:</label></td>
<td><input type="text" name="fInicio" id="fechaIni" readonly="readonly"/><img src="style/img/img.gif" id="selector"/></td>
</tr>
<tr>
<td><label for="fFin">Fecha Fin:</label></td>
<td><input type="text" name="fFin" id="fechaFin" readonly="readonly"/><img src="style/img/img.gif" id="select"/></td>
</tr>
<tr>
<td><input name="submit" value="Publicar" type="submit"></td>
<td><a href="FrontController?res=eventos.jsp">Cancelar</a></td>
</tr>
</table>
</fieldset>
</form>

Un Saludo.