
October 29th, 2009, 08:03 PM
|
|
Contributing User
|
|
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,270
Time spent in forums: 2 Days 10 h 6 m 51 sec
Reputation Power: 4
|
|
|
Javascript - Date Picker problem
So I picked up a bit of code here for a date picker
http://www.triconsole.com/php/calendar_datepicker.php
and while the icon for the calander shows up and the java script for it loads a ifram when i click on it the page it loads gives me a internal server error. I'm tearing my hair out trying to figure out what i'm doing wrong. Ive tied putting Calader form inside the classes folder, outside. Manually set the path. Nothing works.
As a point of reference this is the bit of code that pulls out the form, everything works the way it should except it doesn show the dang calander page
PHP Code:
echo '<h2>Add '.$pagetitle.'</h2>';
echo '<BR><BR><form enctype="multipart/form-data" method="POST">';
echo '<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />';
echo '<B>Name:</B> <input type="text" name="Name"><BR>';
echo '<B>Pic:</B> <input type="file" name="Image"><BR>';
echo '<B>Intro:</B> <TEXTAREA Cols=40 rows=20 name="Intro"></TEXTAREA><BR>';
echo '<B>Status:</B> <select name="Status">';
for ($x=0; $x < 2; $x++){
echo '<option value="'.$x.'">'.IssueStatus($x).'</option>';
};
echo '</select><BR>';
include ('classes/tc_calendar.php');
?>
<div style="float: left;">
<div style="float: left; padding-right: 3px; line-height: 18px;">Deadline:</div>
<div style="float: left;">
<?php
$myCalendar = new tc_calendar("date3", true, false);
$myCalendar->setIcon("images/iconCalendar.gif");
//$myCalendar->setDate(1, 1, 2010);
$myCalendar->setPath("");
$myCalendar->setYearInterval(1970, 2020);
//$myCalendar->dateAllow('2009-02-20', "", false);
$myCalendar->writeScript();
?>
</div>
</div>
<div style="float: left;">
<div style="float: left; padding-left: 3px; padding-right: 3px; line-height: 18px;">Drawing date:</div>
<div style="float: left;">
<?php
$myCalendar = new tc_calendar("date4", true, false);
$myCalendar->setIcon("images/iconCalendar.gif");
//$myCalendar->setDate(1, 1, 2010);
$myCalendar->setPath("");
$myCalendar->setYearInterval(1970, 2020);
//$myCalendar->dateAllow("", '2009-11-03', false);
$myCalendar->writeScript();
?>
</div>
</div>
<p>
<input type="button" name="button2" id="button2" value="Check the value" onClick="javascript:alert('Date select from '+this.form.date3.value+' to '+this.form.date4.value);">
<?
echo '<input type="submit" name="submit" value="Submit" /></form>';
__________________
29 years of creative writing
13 years of HTML
10 years of Photoshop
6 years of PHP/MySQL
And I never knew Photoshop could do HTML until 2004!
You learn something new every day.
|