Witam,
Znalazłem skrypt: formularz-kalendarz, który chciałem przerobic aby odczytać z niego wartości, lecz nic z tego

Skrypt wyglada tak:
<html>
<head>
<title>Formularz daty</title>
<meta name="description" content="Skrypt generuje
kalendarz, za pomocą którego, użytkownik może wygodnie
wstawiać dowolną datę do określonych pól formularza.">
<meta name="kategoria" content="Gości">
<meta name="author" content="Artur">
<meta name="email" content="artur412@poczta.onet.pl">
<meta name="www" content="www.localhost.pl">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<style type="text/css">
body {background-color:BLACK; COLOR:WHITE;}
input {border:1px solid black; margin-bottom:3px;}
input.krotki {width:80px; text-align:center;}
div.clndr
{
background-color:#d0d0d0; position:absolute;
cursor:default; display:none; border:3px ridge #9ab;
}
div.clndr table
{
COLOR:RED;
width:160px; margin:4px;
}
div.clndr th
{
border:1px solid black;
font:normal bold 11px arial,sans-serif;
text-align:center; padding:0 2px 0 2px;
}
div.clndr td
{
border:1px solid blue; cursor:pointer;
font:normal normal 11px arial,sans-serif;
text-align:center; padding:0 2px 0 2px;
}
</style>
<script type="text/javascript">
function Calendar(E,T)
{
if(!document.getElementById||!document.body.appendChild)return
var i,j,tBody,Row,od,Do,d,dt
function cEl(t,p,h,w)
{
p.appendChild(t=document.createElement(t))
if(h)t.innerHTML=h;if(w)t.style.width='27px'
return t
}
function cB(x)
{
with(cld_BlaTek)
{
B=0;x==0?R--:x==1?R++:x==2?(!M?(M=11,R--):M--):(M==11?(M=0,R++):M++)
}
}
with(cld_BlaTek)
{
od=Date.UTC(R,M,1);Do=Date.UTC(R,M+1,1)
}
E=document.getElementById(E)
while(E.childNodes.length)E.removeChild(E.firstChild)
tBody=cEl('tbody',cEl('table',E))
tBody.onmouseup=function()
{
T.focus()
}
tBody.onmousemove=function()
{
if(window.getSelection)window.getSelection().removeAllRanges()
}
Row=cEl('tr',tBody)
cEl('td',Row,'«',1).onmousedown=function(){cB(0)
}
cEl('th',Row,cld_BlaTek.R)
cEl('td',Row,'»',1).onmousedown=function(){cB(1)
}
Row=cEl('tr',tBody)
cEl('td',Row,'«',1).onmousedown=function(){cB(2)
}
cEl('th',Row,cld_BlaTek.month[cld_BlaTek.M])
cEl('td',Row,'»',1).onmousedown=function(){cB(3)
}
tBody=cEl('tbody',cEl('table',E))
Row=cEl('tr',tBody)
for(i=0;i<7;i++)
with(cEl('th',Row,cld_BlaTek.day[i]))
if(i==6)style.backgroundColor='#f88'
for(i=od;i<Do;i+=86400000)
{
with(new Date(i)){d=getUTCDate();dt=getUTCDay()
}
if(dt==1||i==od)Row=cEl('tr',tBody)
if(dt!=1&&d==1)for(j=1;j<(dt?dt:7);j++)cEl('th',Row)
dt=cEl('td',Row,d);dt.onmousedown=function(x)
{
x=+this.innerHTML
with(cld_BlaTek)
T.value=(x<10?'0'+x:x)+'/'+((x=M+1)<10?'0'+x:x)+'/'+R
}
with(cld_BlaTek)
if(d==D.getDate()&&M==D.getMonth()&&R==D.getFullYear())
dt.style.backgroundColor='#fff'
}
T.onblur=function(){if(cld_BlaTek.B)E.style.display='none'
}
cld_BlaTek.B=1;E.style.display='block'
}
//global object (You can translate month&day names)
cld_BlaTek=
{
day:['pn','wt','śr','cz','pt','so','n'],
month:['styczeń','luty','marzec','kwiecień','maj','czerwiec',
'lipiec','sierpień','wrzesień','październik','listopad','grudzień'],
D:new Date(),M:new Date().getMonth(),R:new Date().getFullYear()
}
</script>
</head><body>
<form action="nowy.php" method="post">
<div><input class="krotki" readonly name="od"
onfocus="Calendar('DatePicker1',this)">
</div>
<div id="DatePicker1" class="clndr"></div>
<div><input class="krotki" readonly name="do"
onfocus="Calendar('DatePicker2',this)">
</div>
<div id="DatePicker2" class="clndr"></div>
<div><input type="submit" value="Go!" /></div>
</form>
</body></html>
<?php
//include ("funkcja.php");
if (isset($_POST['submit'])) {
$od=$_POST['od'];
$do=$_POST['do'];
//echo "<br>".workDays("$od","$do", true);
}
?>
Czy możecie coś pomóc w tej sprawie?
Ten post edytował funky_beat 18.02.2008, 14:53:22