Posted: Sun Aug 08, 2004 4:54 pm Post subject: Problem with a calendar (in java) with mozilla ...
Hello.
I post this message in another group but as i find this group more
appropriated after, i post it again ....
I've got a program in java which is a calendar (souce :
javascript.internet.com ) . It works perfectly with Internet explorer
but not with mozilla/firefox. Perhaps, it is a syntax error ...
In the java consol, i got the error message "Error : d0r0 is not
defined" which is relative (i think) to the line : colum_name =
eval("d"+i+"r"+j);
Any help would be great.
Thanks. Here is the program below ...
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Scriptbreaker (pieterpareit (AT) hotmail (DOT) com ) -->
<!-- Web Site: http://www24.brinkster.com/scriptbreaker -->
<!-- Begin
var now = new Date();
var month_array = new
Array("january","february","march","April","May","June","July","August","September","October","November","December");
document.write("
document.write("<select name=month
onchange=change_month(this.options.selectedIndex)>");
for(i=0;i<month_array.length;i++)
{
if (now.getMonth() != i)
{document.write ("
else
{document.write ("<option value="+i+" selected>"+month_array[i]);}
function set_cal(show_date)
{
begin_day = new Date (show_date.getYear(),show_date.getMonth(),1);
begin_day_date = begin_day.getDay();
end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1);
count_day = (end_day - begin_day)/1000/60/60/24;
input_table(begin_day_date,count_day);
}
set_cal(show_date);
function input_table(begin,count)
{
init();
j=0;
if (begin!=0){i=begin-1;}else{i=6}
for (c=1;c<count+1;c++)
{
colum_name = eval("d"+i+"r"+j);
if ((now.getDate() == c)&&(show_date.getMonth() ==
now.getMonth())&&(show_date.getYear() == now.getYear()))
{colum_name.style.backgroundColor = "blue";colum_name.style.color =
"white";};
colum_name.innerText = c;
i++;
if (i==7){i=0;j++;}
}
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum