>On Mon, 12 Jul 2004 00:29:52 -0700 (PDT), [EMAIL PROTECTED] (Melis
>Mutlu) wrote:
>
>>Hi,
>>
>>I have a form with a date field (created by
>>CGI::Quickform). I would like to add a pop up calendar
>>so I can pick dates easily. Does anybody know how I
>>can do that? Is there any module I can use for that?
>>
>>Regards,
This idea will give you a calander embedded inside the webpage.
If you want a seperate window to pop-up i think
that's also possible without the use of java etc.
anyway...
There is a program called cal(1) which produces output like:
July 2004
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
doesn't quite look right after copy past...
this is not portable to Win32 unless there is a perl module that
will give you similar results.
you can wrap the data into a <FORM > structure.
first :
while (`cal`){
push (@array , $_);
}
then:
foreach (@array);
@dates = split (/\s/, $_);
push (@dates , '<br />');
}
now you have each item in a seperate element on @dates along with an extra
'<br />' to
help us see where the line breaks are- you can add form data based on the
contents of the
@dates array.
foreach (@dates){
$data .= '< formsubmitdata >'. $_ .'<otherstuff>';
if ($_ is a linebreak){
$data . = '</tr><tr>'; #if wrapped in a table?
}
not well written, but i think it will give an idea of what you might do.
the concatonation operator '.' makes life much easier when i try this stuff
i'll try to do this myself i think :)
thanks,
willy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>