Ver Mensaje Individual
  #5 (permalink)  
Antiguo 08/10/2008, 10:09
ZARES
 
Fecha de Ingreso: septiembre-2008
Mensajes: 12
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Ordenar articulos por fecha

Chicos ! de nuevo yo ! Estoy intentando implementar el calendario de javascript pero no me funciona. El tema es que la pagina que envía el formulario para luego procesarlo y hacer los correspondientes inserts en la BD lo estoy generando con php. Es decir, estoy escribiendo toda la pagina con echo "...";.

Buscando en google encontré un script para calendarios en javascript. A continuación les muestro el código.

El Paso uno sería escribir esto entre el <head></head>

<script language="javascript">
// Flooble Dynamic Calendar.
// Copyright (c) 2004 by Animus Pactum Consulting Inc.
//---------------------------------------------------------------------
// You may use this code freely on your site as long as you do not make
// modifications to it other than editing the stylesheet settings to
// make it fit your design. You may not remove this notice or any links
// to flooble.com.
// More information about this script is available at
// http://www.flooble.com/scripts/calendar.php
//--Global Stuff-------------------------------------------------------
var fc_ie = false;
if (document.all) { fc_ie = true; }

var calendars = Array();
var fc_months = Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
var fc_openCal;

var fc_calCount = 0;

function getCalendar(fieldId) {
return calendars[fieldId];
}

function displayCalendarFor(fieldId) {
var formElement = fc_getObj(fieldId);
displayCalendar(formElement);
}

function displayCalendar(formElement) {
if (!formElement.id) {
formElement.id = fc_calCount++;
}
var cal = calendars[formElement.id];
if (typeof(cal) == 'undefined') {
cal = new floobleCalendar();
cal.setElement(formElement);
calendars[formElement.id] = cal;
}
if (cal.shown) {
cal.hide();
} else {
cal.show();
}
}

function display3FieldCalendar(me, de, ye) {
if (!me.id) { me.id = fc_calCount++; }
if (!de.id) { de.id = fc_calCount++; }
if (!ye.id) { ye.id = fc_calCount++; }
var id = me.id + '-' + de.id + '-' + ye.id;
var cal = calendars[id];
if (typeof(cal) == 'undefined') {
cal = new floobleCalendar();
cal.setElements(me, de, ye);
calendars[id] = cal;
}
if (cal.shown) {
cal.hide();
} else {
cal.show();
}
}

//--Class Stuff--------------------------------------------------