By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

javascript calendar

P: n/a

I have a javascript file named select.js. This is a file which is use
to pop up a calendar, when clicked on a calendar icon in an ASP file.
have a close button in the calendar. When i click on the button, th
calendar is not closing.

here is the select.js file

x999NS4compatible = (document.layers);
var x999IE4compatible = (document.all);
var x999dayabbs = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ];
var x999daynames = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday'
'Thursday', 'Friday', 'Saturday' ];
var x999monthnames = [ 'January', 'February', 'March', 'April', 'May'
'June', 'July', 'August', 'September', 'October', 'November'
'December' ];
var x999monthabbs = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'
'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
var x999weekdays = [ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ];
var x999months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'
'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
var x999years = new Array(10);
for (i = 0; i < x999years.length; i++) x999years[i] = 1999 + i;
var x999today = new Date();
var x999currentday = x999today.getDate();
var x999currentmonth = x999today.getMonth();
var x999currentyear = x999today.getFullYear();
var x999left = 100;
var x999top = 80;
var x999width = 220;
var x999height = 260;
var x999cell_width = 25;
var x999cell_height = 25;
var x999bg_color = '#0072a0';
var x999offsety = 32;
var x999fontface = "verdana";
var x999weekcolor = "yellow";
var x999weeksize= "2";
var x999lowyear = 1900;
var x999highyear = 2999;
var x999weekfont = '<font face="' + x999fontface + '" size="'
x999weeksize + '" color="' + x999weekcolor + '">';
var x999font = '<font face="' + x999fontface + '" size="1">';
+ ";color:#000000;font-size:7pt;font-weight:bold;'";
var x999stylecombo = "style = 'font-family:" + x999fontface
";color:#000000;font-size:7pt;font-weight:bold;'";
var x999style = "style = 'font-family:" + x999fontface
";BACKGROUND-COLOR: #004680; FONT-SIZE: xx-small; FONT-WEIGHT: bold
HEIGHT: 22px; WIDTH: 23px ;COLOR: WHITE'";
var x999stylebut = "style = 'font-family:" + x999fontface
";BACKGROUND-COLOR: #004680; FONT-SIZE: xx-small; FONT-WEIGHT: bold
HEIGHT: 22px; WIDTH: 43px ;COLOR: WHITE'";
var x999headerstyle = "style = 'font-family:" + x999fontface
";color:#000000;font-size:1;font-weight:bold;'";
var x999daystyle = "style = 'BACKGROUND-COLOR: #004680; FONT-SIZE
xxx-small; FONT-WEIGHT: bold; HEIGHT: 20px; WIDTH: 24px ;COLOR
WHITE;BORDER-TOP:BLUE;BORDER-LEFT:BLUE'";
var x999tableborder = '1';
var frm_name = '';
var frm_fld = ''

function x999cal(is_popup, win
handler,form_name,field_name,field_value,left, top, height
bg_color,width,
cell_width, cell_height, sel_month, sel_year)
{
this.is_popup = is_popup;
this.parent = null;
this.window = null;
if (this.is_popup)
this.parent = win;
else
this.window = win;
frm_name = form_name;
frm_fld = field_name;
fld_val = field_value;

this.handler = handler;
this.left = left;
this.top = top;
this.width = width || x999width;
this.height = height || x999height;
this.cell_width = cell_width || x999cell_width;
this.cell_height = cell_height || x999cell_height;
this.bg_color = bg_color || x999bg_color;
this.sel_month = sel_month;
this.sel_year = sel_year;

if((fld_val) != "")
{
if (fld_val.length > 10 || fld_val.length < 8)
{
alert("Invalid date");
return false;
exit();
}

a=fld_val.split("/");

mon = a[0];
dat = a[1];
yr = a[2];

if (yr == 0000)
{
alert("This is an invalid year");
return false;
exit();
}

else if (mon == null || dat == null || yr == null || mon.length > 2 |
dat.length > 2 || yr.length !=4)
{
alert("The date format has to be mm/dd/yyyy");
return false;
exit();
}

else if (isNaN(mon) == 1 || isNaN(dat) == 1 || isNaN(yr) == 1)
{
alert("Invalid date : No text form date allowed, only numeric forma
to be entered");
return false;
exit();
}

else if (mon < 1 || mon > 12)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , mont
has to be between 1 and 12")
return false;
exit();
}

else if (mon == 1 || mon == 3 || mon == 5 || mon == 7 || mon == 8 ||
mon == 10 || mon == 12)
{
if (dat < 1 || dat > 31)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month")
return false;
exit();
}
}

else if(mon == 4 || mon == 6 || mon == 9 || mon == 11)
{
if(dat < 1 || dat > 31)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month")
return false;
exit();
}
}

else if (mon == 2)
{
if (yr%4 == 0)
{
if(yr%100 != 0 || yr%400 == 0)
{
if (dat < 1 || dat > 29)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month")
return false;
exit();
}
}
}
else if (dat < 1 || dat > 28)
{
alert( "Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month");
return false;
exit();
}
}
this.sel_year = yr;
this.sel_month = mon-1;
}
else
{
this.sel_year = x999currentyear;
this.sel_month = x999currentmonth;
}
this.days = new Array(42);
this.cal = null;
this.day_table = null;

if (x999NS4compatible)
{
x999cal.prototype.create_cal = x999cal_create_cal_NS4;
x999cal.prototype.show_days = x999cal_show_days_NS4();
}
else
{
x999cal.prototype.create_cal = x999cal_create_cal_IE4;
x999cal.prototype.show_days = x999cal_show_days_IE4;
}
x999cal.prototype.popup_cal = x999cal_popup_cal;
x999cal.prototype.prev_year = x999cal_prev_year;
x999cal.prototype.next_year = x999cal_next_year;
x999cal.prototype.new_year = x999cal_new_year;
x999cal.prototype.prev_month = x999cal_prev_month;
x999cal.prototype.next_month =
x999cal_next_month;x999cal.prototype.clicked_day =
x999cal_clicked_day;
if (x999cal.prototype.id == null) x999cal.prototype.id = 0;
x999cal.prototype.id++;
this.id = x999cal.prototype.id;
this.cal_id = 'cal' + this.id;
this.day_table_id = 'day_table' + this.id;
this.select_form_id = 'select_form' + this.id;
}
function x999cal_create_cal_NS4()
{
if (this.is_popup)
{
var x = this.parent.screenX + (this.parent.outerWidth -
this.parent.innerWidth) + (this.left || x999left);
var y = this.parent.screenY + (this.parent.outerHeight -
this.parent.innerHeight) + (this.top || x999top);
this.window = this.parent.open("", this.cal_id, 'screenX=' + x +
',screenY=' + y + ',innerWidth=' + this.width + ',innerHeight=' +
this.height + ',scrollbars=no,resizeable=no');
this.window.document.open(); //Need to open and close document in
Navigator
this.window.document.writeln('<title>CCC STS Calendar</title>');
this.window.document.close();
}

this.cal = new Layer(this.width, this.window);
this.cal.name = this.cal_id;
if (this.is_popup)
{
this.cal.left = 0;
this.cal.top = 0;
}
else
{
this.cal.left = this.left || x999left;
this.cal.top = this.top || x999top;
}

this.cal.zIndex = 1;
this.cal.clip.width = this.width;
this.cal.clip.height = this.height;
this.cal.bgColor = this.bg_color;
this.cal.visibility = 'show';
var doc = this.cal.document;
var x999today = new Date();
var vYear = x999today.getFullYear();

doc.picker = this;
doc.open();
doc.writeln("<center>");
doc.writeln("<table align='center' border='0' cellpadding='0'>");
doc.writeln(" <tr>");
doc.writeln(" <td align='center'>");
doc.writeln(" <form name='" + this.select_form_id + "'>" +
x999font);
doc.writeln(" <input type='button' value='&lt;&lt;'
onClick='document.picker.prev_year()' " + x999style + ">");
doc.writeln(" <input type='button' value='&nbsp;&lt;&nbsp;'
onClick='document.picker.prev_month()' " + x999style + ">");
doc.writeln(" <select name='month_sel'
onChange='document.picker.new_year()' " + x999style + " >");
for (i = 0; i < x999months.length; i++)
doc.writeln(" <option value='" + i + "'>" + x999months[i]);
doc.writeln(" </select></font>");
doc.writeln(" " + x999font + " <input type = 'text' value = '"
+ vYear + "' size = '4' maxlength = '4' name = 'year_sel' " +
x999headerstyle + " onBlur='document.picker.new_year()'>\n");
doc.writeln(" <input type='button' value='&nbsp;&gt;&nbsp;'
onClick='document.picker.next_month()' " + x999style + ">");
doc.writeln(" <input type='button' value='&gt;&gt;'
onClick='document.picker.next_year()' " + x999style + ">");
doc.writeln(" </form>");
doc.writeln(" </td>");
doc.writeln(" </tr>");
doc.writeln("</table>");
doc.writeln("</center>");
doc.close();
this.day_table = new Layer(this.width, this.cal);
this.day_table.name = this.day_table_id;
this.day_table.left = 0;
this.day_table.top = x999offsety;
this.day_table.zIndex = 2;
this.day_table.visibility = 'inherit';

}

function x999cal_show_days_NS4()
{

var month_select =
this.cal.document.forms[this.select_form_id]['month_sel'];
var year_select =
this.cal.document.forms[this.select_form_id]['year_sel'];
month_select.selectedIndex = this.sel_month;
year_select.value = this.sel_year;
var days_in_month = get_days_in_month(this.sel_month,
this.sel_year);
var day_of_week_first = (new Date(this.sel_year, this.sel_month,
1)).getDay() - 0;
if (day_of_week_first< 1) day_of_week_first += 7;
for (i = 0; i < this.days.length; i++) this.days[i] = 0;
for (i = 0; i < days_in_month; i++)
this.days[i + day_of_week_first] = i + 1;
var doc = this.day_table.document;
doc.picker = this;
doc.open();
doc.writeln("<center>");
doc.writeln("<table align='center' border='" + x999tableborder
"'>");
doc.writeln("<form>");
doc.writeln(" <tr>");
for (j = 0; j < x999weekdays.length; j++)
{
doc.writeln(" <td align='center' valign='middle' width='"
this.cell_width + "' >" + x999weekfont + x999weekdays[j] + "</td>");
}
doc.writeln(" </tr>");
for (i = 0; i < 6; i++)
{
doc.writeln(" <tr>");
for(j = 0; j < 7; j++)
{
var val = this.days[i * 7 + j];
if (val > 0 && val < 10) val = " " + val + " ";
if (this.days[i * 7 + j])
{
doc.writeln(" <td align='center' valign='middle' height='"
this.cell_height + "'>" + x999font + "<input type='button' value='"
val + "' onClick='document.picker.clicked_day(" + this.days[i * 7 + j
+ ")'></td>");
}
else
doc.writeln(" <td>&nbsp;</td>");
}
doc.writeln(" </tr>");
}
doc.writeln("<input type='button' value='Close' onClick='' "
x999stylebut + ">");
doc.writeln("</form>");
doc.writeln("</table>");
doc.writeln("</center>");
doc.close();
}
function x999cal_create_cal_IE4()
{
if (this.is_popup)
{
var x = this.parent.screenLeft + (this.left || x999left);
var y = this.parent.screenTop + (this.top || x999top);
this.window = this.parent.open("", this.cal_id, 'left=' + x
',top=' + y + ',width=' + this.width + ',height=' + this.height
',scrollbars=no,resizeable=no');
this.window.document.open();
this.window.document.writeln('<title>CCC STS Calendar</title>');
this.window.document.close();
}

this.window.document.body.insertAdjacentHTML("befo reEnd", "<div id='
+ this.cal_id + "' style='position:absolute'></div>");
this.cal = this.window.document.all[this.cal_id];
if (this.is_popup)
{
this.cal.style.pixelLeft = 0;
this.cal.style.pixelTop = 0;
}
else
{
this.cal.style.pixelLeft = this.left || x999left;
this.cal.style.pixelTop = this.top || x999top;
}
this.cal.style.zIndex = 1;
this.cal.style.width = this.width;
this.cal.style.height = this.height;
this.cal.style.backgroundColor = this.bg_color;
this.cal.style.visibility = 'visible';
this.cal.picker = this;
var x999today = new Date();
var vYear = x999today.getFullYear();
var str =
"<center>\n" +
"<table align='center' border='0' cellpadding='0
cellspacing='0'><tr><td><table align='center' border='0'>\n" +
" <form name='" + this.select_form_id + "'>\n" +
" <tr>\n" +
" <td align='center'>\n" +
" <input type='button' " + x999style + " value='&lt;&lt;
onClick='document.all." + this.cal_id + ".picker.prev_year()'>\n" +
" <input type='button' " + x999style + " value='&lt;&nbsp;
onClick='document.all." + this.cal_id + ".picker.prev_month()'>\n" +
" <select name='month_sel' " + x999stylecombo + "
onChange='document.all." + this.cal_id + ".picker.new_year()'>\n";
for (i = 0; i < x999months.length; i++)
str += " <option value='" + i + "'>" + x999months[i] + "\n";
str += " </select>\n" +
" <input type = 'text' value = '" + vYear + "' size = '4
maxlength = '4' name = 'year_sel' " + x999stylecombo +
onBlur='document.all." + this.cal_id + ".picker.new_year()'>\n" +
" <input type='button' " + x999style + " value='&gt;&nbsp;
onClick='document.all." + this.cal_id + ".picker.next_month()'>\n" +
" <input type='button' " + x999style + " value='&gt;&gt;
onClick='document.all." + this.cal_id + ".picker.next_year()'>\n" +
" </td>\n" +
" </tr>\n" +
" </form>\n" +
"</table>\n" +
"</center>\n" +
"<div id='" + this.day_table_id + "
style='position:absolute'></div>\n";this.cal.innerHTML = str;
this.day_table = this.window.document.all[this.day_table_id];
this.day_table.style.pixelLeft = 4;
this.day_table.style.pixelTop = x999offsety;
this.day_table.style.zIndex = 2;
this.day_table.style.visibility = 'inherit';
this.day_table.picker = this;

}

function y2k(number)
{
return (number < 1000) ? number + 1900 : number;
}

function getWeek(year,month,day)
{
var when = new Date(year,month,day);
var newYear = new Date(year,0,1);
var offset = 7 + 1 - newYear.getDay();
if (offset == 8) offset = 1;
var daynum =
((Date.UTC(y2k(year),when.getMonth(),when.getDate( ),0,0,0) -
Date.UTC(y2k(year),0,1,0,0,0)) /1000/60/60/24) + 1;
var weeknum = Math.floor((daynum-offset+7)/7);
if (month == 0 && weeknum > 7) weeknum = 0;
if (offset != 1) weeknum = weeknum + 1;
if (weeknum == 0) {
year--;
var prevNewYear = new Date(year,0,1);
var prevOffset = 7 + 1 - prevNewYear.getDay();
if (prevOffset == 2 || prevOffset == 8) weeknum = 53; else
weeknum = 52;
}
return weeknum;
}

function x999cal_show_days_IE4()
{
var month_select =
this.window.document.forms[this.select_form_id]['month_sel'];
var year_select =
this.window.document.forms[this.select_form_id]['year_sel'];
month_select.selectedIndex = this.sel_month;
year_select.value = this.sel_year;
var days_in_month = (new Date(this.sel_year, this.sel_month+1,
0)).getDate();
var day_of_week_first = (new Date(this.sel_year, this.sel_month,
1)).getDay() - 0;
if (day_of_week_first< 0 ) day_of_week_first += 7;
for (i = 0; i < this.days.length; i++) this.days[i] = 0;
for (i = 0; i < days_in_month; i++)
this.days[i + day_of_week_first] = i + 1;
var str =
"<center>\n" +
"&nbsp;&nbsp;<table align='center' border='" + x999tableborder +
"'>\n" +
"<form>\n" +
" <tr>\n";
for (j = 0; j < x999weekdays.length; j++)
{
str += " <td align='center' valign='middle' width='" +
this.cell_width + "'>" + x999weekfont + x999weekdays[j] + "</td>\n";
}
str += " </tr>\n";
for (i = 0; i < 6; i++)
{
str += " <tr>\n";
for(j = 0; j < 7; j++)
{
var val = this.days[i * 7 + j];
if (val > 0 && val < 10) val = " " + val + " ";
if (this.days[i * 7 + j])
{
str += " <td align='center' valign='middle' height='" +
this.cell_height + "'>" + x999font + "<input type='button' " +
x999daystyle + " value='" + val + "' onClick='document.all." +
this.day_table_id + ".picker.clicked_day(" + this.days[i * 7 + j] +
")'></td>\n";
}
else
str += " <td>&nbsp;</td>\n";
}

str += " </tr>\n";
}
str +=
"</form>\n" +
"</table>\n" +
"</center>\n" +
"<input type='button' value='Close' onClick='x999cal_clicked_day(1)'"
+ x999stylebut + ">";

this.day_table.innerHTML = str;
}

function funclose_button()
{

var dt1 = eval("document."+frm_name+"."+frm_fld);
var x999today = new Date();
var x999currentday = x999today.getDate();
var x999currentmonth = x999today.getMonth();
var x999currentyear = x999today.getFullYear();
dt1.value = x999currentday + '/' + x999currentmonth+1 + '/' +
x999currentyear;
}
function x999cal_popup_cal()
{
if (this.is_popup)
{
if (this.cal && this.window && !this.window.closed)
this.window.close();
else
{
this.create_cal();
this.show_days();
}
}
else
{
if (!this.cal)
{
this.create_cal();
this.show_days();
}
else
{
if (x999NS4compatible)
{
if (this.cal.visibility == 'show')
this.cal.visibility = 'hide';
else
this.cal.visibility = 'show';
}
else
{
if (this.cal.style.visibility == 'visible')
this.cal.style.visibility = 'hidden';
else
this.cal.style.visibility = 'visible';
}
}
}

}

function x999cal_new_year()
{

var month_select =
this.cal.document.forms[this.select_form_id]['month_sel'];
this.sel_month = new
Number(month_select.options[month_select.selectedIndex].value);
var year_select =
this.cal.document.forms[this.select_form_id]['year_sel'];
this.sel_year = new Number(year_select.value);
if ( (isNaN(parseInt(this.sel_year))) || (this.sel_year < x999lowyear)
|| (this.sel_year > x999highyear) )
{

window.alert('This is not a valid year.');
var x999today = new Date;
var yr = x999today.getFullYear();
this.sel_year = yr;
}
this.show_days();
function");

}

function x999cal_clicked_day(day)
{

day = 5;
alert(day);

if (this.is_popup)
this.window.close();
if (x999NS4compatible)
this.cal.visibility = 'hide';
else
this.cal.style.visibility = 'hidden';
var sel_date = new Date(this.sel_year, this.sel_month, day);
if (this.handler) this.handler(this, sel_date);

}

function twodigit(num)
{

var numStr = num + '';
if (numStr.length == 1)
{
numStr = "0" + numStr;
}

return numStr;

}

function righttwodigits(num)
{var numStr = num + '';
if (numStr.length == 4) {
numStr = numStr.substring(1,3);}

return numStr;
}

function get_days_in_month(mon, yr)
{

var month = new Number(mon);
var year = new Number(yr);
var mdays = [ [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] ];
var isleap =
(year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) ? 1 : 0;
return mdays[isleap][month];}
function my_date_selected(cal, date)
{
var dt = eval("document."+frm_name+"."+frm_fld);
dt.value = twodigit(date.getMonth() + 1) + '/' +
twodigit(date.getDate()) + '/' + date.getFullYear();
}
if i include window.close( for the close button, the whole parent
window is only closing. I want to close only the calendar.
vinu
------------------------------------------------------------------------
Posted via http://www.forum4designers.com
------------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message34935.html

Jul 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
"vinu" <vi*********@mail.forum4designers.com> wrote in message
news:vi*********@mail.forum4designers.com...

I have a javascript file named select.js. This is a file which is used
to pop up a calendar, when clicked on a calendar icon in an ASP file. I
have a close button in the calendar. When i click on the button, the
calendar is not closing.

here is the select.js file

x999NS4compatible = (document.layers);
var x999IE4compatible = (document.all);
var x999dayabbs = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ];
var x999daynames = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday' ];
var x999monthnames = [ 'January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October', 'November',
'December' ];
var x999monthabbs = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
var x999weekdays = [ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ];
var x999months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
var x999years = new Array(10);
for (i = 0; i < x999years.length; i++) x999years[i] = 1999 + i;
var x999today = new Date();
var x999currentday = x999today.getDate();
var x999currentmonth = x999today.getMonth();
var x999currentyear = x999today.getFullYear();
var x999left = 100;
var x999top = 80;
var x999width = 220;
var x999height = 260;
var x999cell_width = 25;
var x999cell_height = 25;
var x999bg_color = '#0072a0';
var x999offsety = 32;
var x999fontface = "verdana";
var x999weekcolor = "yellow";
var x999weeksize= "2";
var x999lowyear = 1900;
var x999highyear = 2999;
var x999weekfont = '<font face="' + x999fontface + '" size="' +
x999weeksize + '" color="' + x999weekcolor + '">';
var x999font = '<font face="' + x999fontface + '" size="1">';
+ ";color:#000000;font-size:7pt;font-weight:bold;'";
var x999stylecombo = "style = 'font-family:" + x999fontface +
";color:#000000;font-size:7pt;font-weight:bold;'";
var x999style = "style = 'font-family:" + x999fontface +
";BACKGROUND-COLOR: #004680; FONT-SIZE: xx-small; FONT-WEIGHT: bold;
HEIGHT: 22px; WIDTH: 23px ;COLOR: WHITE'";
var x999stylebut = "style = 'font-family:" + x999fontface +
";BACKGROUND-COLOR: #004680; FONT-SIZE: xx-small; FONT-WEIGHT: bold;
HEIGHT: 22px; WIDTH: 43px ;COLOR: WHITE'";
var x999headerstyle = "style = 'font-family:" + x999fontface +
";color:#000000;font-size:1;font-weight:bold;'";
var x999daystyle = "style = 'BACKGROUND-COLOR: #004680; FONT-SIZE:
xxx-small; FONT-WEIGHT: bold; HEIGHT: 20px; WIDTH: 24px ;COLOR:
WHITE;BORDER-TOP:BLUE;BORDER-LEFT:BLUE'";
var x999tableborder = '1';
var frm_name = '';
var frm_fld = ''

function x999cal(is_popup, win,
handler,form_name,field_name,field_value,left, top, height,
bg_color,width,
cell_width, cell_height, sel_month, sel_year)
{
this.is_popup = is_popup;
this.parent = null;
this.window = null;
if (this.is_popup)
this.parent = win;
else
this.window = win;
frm_name = form_name;
frm_fld = field_name;
fld_val = field_value;

this.handler = handler;
this.left = left;
this.top = top;
this.width = width || x999width;
this.height = height || x999height;
this.cell_width = cell_width || x999cell_width;
this.cell_height = cell_height || x999cell_height;
this.bg_color = bg_color || x999bg_color;
this.sel_month = sel_month;
this.sel_year = sel_year;

if((fld_val) != "")
{
if (fld_val.length > 10 || fld_val.length < 8)
{
alert("Invalid date");
return false;
exit();
}

a=fld_val.split("/");

mon = a[0];
dat = a[1];
yr = a[2];

if (yr == 0000)
{
alert("This is an invalid year");
return false;
exit();
}

else if (mon == null || dat == null || yr == null || mon.length > 2 ||
dat.length > 2 || yr.length !=4)
{
alert("The date format has to be mm/dd/yyyy");
return false;
exit();
}

else if (isNaN(mon) == 1 || isNaN(dat) == 1 || isNaN(yr) == 1)
{
alert("Invalid date : No text form date allowed, only numeric format
to be entered");
return false;
exit();
}

else if (mon < 1 || mon > 12)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , month
has to be between 1 and 12")
return false;
exit();
}

else if (mon == 1 || mon == 3 || mon == 5 || mon == 7 || mon == 8 ||
mon == 10 || mon == 12)
{
if (dat < 1 || dat > 31)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month")
return false;
exit();
}
}

else if(mon == 4 || mon == 6 || mon == 9 || mon == 11)
{
if(dat < 1 || dat > 31)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month")
return false;
exit();
}
}

else if (mon == 2)
{
if (yr%4 == 0)
{
if(yr%100 != 0 || yr%400 == 0)
{
if (dat < 1 || dat > 29)
{
alert("Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month")
return false;
exit();
}
}
}
else if (dat < 1 || dat > 28)
{
alert( "Invalid Date : The date format should be mm/dd/yyyy , the
date value you have entered is not a valid date for this month");
return false;
exit();
}
}
this.sel_year = yr;
this.sel_month = mon-1;
}
else
{
this.sel_year = x999currentyear;
this.sel_month = x999currentmonth;
}
this.days = new Array(42);
this.cal = null;
this.day_table = null;

if (x999NS4compatible)
{
x999cal.prototype.create_cal = x999cal_create_cal_NS4;
x999cal.prototype.show_days = x999cal_show_days_NS4();
}
else
{
x999cal.prototype.create_cal = x999cal_create_cal_IE4;
x999cal.prototype.show_days = x999cal_show_days_IE4;
}
x999cal.prototype.popup_cal = x999cal_popup_cal;
x999cal.prototype.prev_year = x999cal_prev_year;
x999cal.prototype.next_year = x999cal_next_year;
x999cal.prototype.new_year = x999cal_new_year;
x999cal.prototype.prev_month = x999cal_prev_month;
x999cal.prototype.next_month =
x999cal_next_month;x999cal.prototype.clicked_day =
x999cal_clicked_day;
if (x999cal.prototype.id == null) x999cal.prototype.id = 0;
x999cal.prototype.id++;
this.id = x999cal.prototype.id;
this.cal_id = 'cal' + this.id;
this.day_table_id = 'day_table' + this.id;
this.select_form_id = 'select_form' + this.id;
}
function x999cal_create_cal_NS4()
{
if (this.is_popup)
{
var x = this.parent.screenX + (this.parent.outerWidth -
this.parent.innerWidth) + (this.left || x999left);
var y = this.parent.screenY + (this.parent.outerHeight -
this.parent.innerHeight) + (this.top || x999top);
this.window = this.parent.open("", this.cal_id, 'screenX=' + x +
',screenY=' + y + ',innerWidth=' + this.width + ',innerHeight=' +
this.height + ',scrollbars=no,resizeable=no');
this.window.document.open(); //Need to open and close document in
Navigator
this.window.document.writeln('<title>CCC STS Calendar</title>');
this.window.document.close();
}

this.cal = new Layer(this.width, this.window);
this.cal.name = this.cal_id;
if (this.is_popup)
{
this.cal.left = 0;
this.cal.top = 0;
}
else
{
this.cal.left = this.left || x999left;
this.cal.top = this.top || x999top;
}

this.cal.zIndex = 1;
this.cal.clip.width = this.width;
this.cal.clip.height = this.height;
this.cal.bgColor = this.bg_color;
this.cal.visibility = 'show';
var doc = this.cal.document;
var x999today = new Date();
var vYear = x999today.getFullYear();

doc.picker = this;
doc.open();
doc.writeln("<center>");
doc.writeln("<table align='center' border='0' cellpadding='0'>");
doc.writeln(" <tr>");
doc.writeln(" <td align='center'>");
doc.writeln(" <form name='" + this.select_form_id + "'>" +
x999font);
doc.writeln(" <input type='button' value='&lt;&lt;'
onClick='document.picker.prev_year()' " + x999style + ">");
doc.writeln(" <input type='button' value='&nbsp;&lt;&nbsp;'
onClick='document.picker.prev_month()' " + x999style + ">");
doc.writeln(" <select name='month_sel'
onChange='document.picker.new_year()' " + x999style + " >");
for (i = 0; i < x999months.length; i++)
doc.writeln(" <option value='" + i + "'>" + x999months[i]);
doc.writeln(" </select></font>");
doc.writeln(" " + x999font + " <input type = 'text' value = '"
+ vYear + "' size = '4' maxlength = '4' name = 'year_sel' " +
x999headerstyle + " onBlur='document.picker.new_year()'>\n");
doc.writeln(" <input type='button' value='&nbsp;&gt;&nbsp;'
onClick='document.picker.next_month()' " + x999style + ">");
doc.writeln(" <input type='button' value='&gt;&gt;'
onClick='document.picker.next_year()' " + x999style + ">");
doc.writeln(" </form>");
doc.writeln(" </td>");
doc.writeln(" </tr>");
doc.writeln("</table>");
doc.writeln("</center>");
doc.close();
this.day_table = new Layer(this.width, this.cal);
this.day_table.name = this.day_table_id;
this.day_table.left = 0;
this.day_table.top = x999offsety;
this.day_table.zIndex = 2;
this.day_table.visibility = 'inherit';

}

function x999cal_show_days_NS4()
{

var month_select =
this.cal.document.forms[this.select_form_id]['month_sel'];
var year_select =
this.cal.document.forms[this.select_form_id]['year_sel'];
month_select.selectedIndex = this.sel_month;
year_select.value = this.sel_year;
var days_in_month = get_days_in_month(this.sel_month,
this.sel_year);
var day_of_week_first = (new Date(this.sel_year, this.sel_month,
1)).getDay() - 0;
if (day_of_week_first< 1) day_of_week_first += 7;
for (i = 0; i < this.days.length; i++) this.days[i] = 0;
for (i = 0; i < days_in_month; i++)
this.days[i + day_of_week_first] = i + 1;
var doc = this.day_table.document;
doc.picker = this;
doc.open();
doc.writeln("<center>");
doc.writeln("<table align='center' border='" + x999tableborder +
"'>");
doc.writeln("<form>");
doc.writeln(" <tr>");
for (j = 0; j < x999weekdays.length; j++)
{
doc.writeln(" <td align='center' valign='middle' width='" +
this.cell_width + "' >" + x999weekfont + x999weekdays[j] + "</td>");
}
doc.writeln(" </tr>");
for (i = 0; i < 6; i++)
{
doc.writeln(" <tr>");
for(j = 0; j < 7; j++)
{
var val = this.days[i * 7 + j];
if (val > 0 && val < 10) val = " " + val + " ";
if (this.days[i * 7 + j])
{
doc.writeln(" <td align='center' valign='middle' height='" +
this.cell_height + "'>" + x999font + "<input type='button' value='" +
val + "' onClick='document.picker.clicked_day(" + this.days[i * 7 + j]
+ ")'></td>");
}
else
doc.writeln(" <td>&nbsp;</td>");
}
doc.writeln(" </tr>");
}
doc.writeln("<input type='button' value='Close' onClick='' " +
x999stylebut + ">");
doc.writeln("</form>");
doc.writeln("</table>");
doc.writeln("</center>");
doc.close();
}
function x999cal_create_cal_IE4()
{
if (this.is_popup)
{
var x = this.parent.screenLeft + (this.left || x999left);
var y = this.parent.screenTop + (this.top || x999top);
this.window = this.parent.open("", this.cal_id, 'left=' + x +
',top=' + y + ',width=' + this.width + ',height=' + this.height +
',scrollbars=no,resizeable=no');
this.window.document.open();
this.window.document.writeln('<title>CCC STS Calendar</title>');
this.window.document.close();
}

this.window.document.body.insertAdjacentHTML("befo reEnd", "<div id='"
+ this.cal_id + "' style='position:absolute'></div>");
this.cal = this.window.document.all[this.cal_id];
if (this.is_popup)
{
this.cal.style.pixelLeft = 0;
this.cal.style.pixelTop = 0;
}
else
{
this.cal.style.pixelLeft = this.left || x999left;
this.cal.style.pixelTop = this.top || x999top;
}
this.cal.style.zIndex = 1;
this.cal.style.width = this.width;
this.cal.style.height = this.height;
this.cal.style.backgroundColor = this.bg_color;
this.cal.style.visibility = 'visible';
this.cal.picker = this;
var x999today = new Date();
var vYear = x999today.getFullYear();
var str =
"<center>\n" +
"<table align='center' border='0' cellpadding='0'
cellspacing='0'><tr><td><table align='center' border='0'>\n" +
" <form name='" + this.select_form_id + "'>\n" +
" <tr>\n" +
" <td align='center'>\n" +
" <input type='button' " + x999style + " value='&lt;&lt;'
onClick='document.all." + this.cal_id + ".picker.prev_year()'>\n" +
" <input type='button' " + x999style + " value='&lt;&nbsp;'
onClick='document.all." + this.cal_id + ".picker.prev_month()'>\n" +
" <select name='month_sel' " + x999stylecombo + "
onChange='document.all." + this.cal_id + ".picker.new_year()'>\n";
for (i = 0; i < x999months.length; i++)
str += " <option value='" + i + "'>" + x999months[i] + "\n";
str += " </select>\n" +
" <input type = 'text' value = '" + vYear + "' size = '4'
maxlength = '4' name = 'year_sel' " + x999stylecombo + "
onBlur='document.all." + this.cal_id + ".picker.new_year()'>\n" +
" <input type='button' " + x999style + " value='&gt;&nbsp;'
onClick='document.all." + this.cal_id + ".picker.next_month()'>\n" +
" <input type='button' " + x999style + " value='&gt;&gt;'
onClick='document.all." + this.cal_id + ".picker.next_year()'>\n" +
" </td>\n" +
" </tr>\n" +
" </form>\n" +
"</table>\n" +
"</center>\n" +
"<div id='" + this.day_table_id + "'
style='position:absolute'></div>\n";this.cal.innerHTML = str;
this.day_table = this.window.document.all[this.day_table_id];
this.day_table.style.pixelLeft = 4;
this.day_table.style.pixelTop = x999offsety;
this.day_table.style.zIndex = 2;
this.day_table.style.visibility = 'inherit';
this.day_table.picker = this;

}

function y2k(number)
{
return (number < 1000) ? number + 1900 : number;
}

function getWeek(year,month,day)
{
var when = new Date(year,month,day);
var newYear = new Date(year,0,1);
var offset = 7 + 1 - newYear.getDay();
if (offset == 8) offset = 1;
var daynum =
((Date.UTC(y2k(year),when.getMonth(),when.getDate( ),0,0,0) -
Date.UTC(y2k(year),0,1,0,0,0)) /1000/60/60/24) + 1;
var weeknum = Math.floor((daynum-offset+7)/7);
if (month == 0 && weeknum > 7) weeknum = 0;
if (offset != 1) weeknum = weeknum + 1;
if (weeknum == 0) {
year--;
var prevNewYear = new Date(year,0,1);
var prevOffset = 7 + 1 - prevNewYear.getDay();
if (prevOffset == 2 || prevOffset == 8) weeknum = 53; else
weeknum = 52;
}
return weeknum;
}

function x999cal_show_days_IE4()
{
var month_select =
this.window.document.forms[this.select_form_id]['month_sel'];
var year_select =
this.window.document.forms[this.select_form_id]['year_sel'];
month_select.selectedIndex = this.sel_month;
year_select.value = this.sel_year;
var days_in_month = (new Date(this.sel_year, this.sel_month+1,
0)).getDate();
var day_of_week_first = (new Date(this.sel_year, this.sel_month,
1)).getDay() - 0;
if (day_of_week_first< 0 ) day_of_week_first += 7;
for (i = 0; i < this.days.length; i++) this.days[i] = 0;
for (i = 0; i < days_in_month; i++)
this.days[i + day_of_week_first] = i + 1;
var str =
"<center>\n" +
"&nbsp;&nbsp;<table align='center' border='" + x999tableborder +
"'>\n" +
"<form>\n" +
" <tr>\n";
for (j = 0; j < x999weekdays.length; j++)
{
str += " <td align='center' valign='middle' width='" +
this.cell_width + "'>" + x999weekfont + x999weekdays[j] + "</td>\n";
}
str += " </tr>\n";
for (i = 0; i < 6; i++)
{
str += " <tr>\n";
for(j = 0; j < 7; j++)
{
var val = this.days[i * 7 + j];
if (val > 0 && val < 10) val = " " + val + " ";
if (this.days[i * 7 + j])
{
str += " <td align='center' valign='middle' height='" +
this.cell_height + "'>" + x999font + "<input type='button' " +
x999daystyle + " value='" + val + "' onClick='document.all." +
this.day_table_id + ".picker.clicked_day(" + this.days[i * 7 + j] +
")'></td>\n";
}
else
str += " <td>&nbsp;</td>\n";
}

str += " </tr>\n";
}
str +=
"</form>\n" +
"</table>\n" +
"</center>\n" +
"<input type='button' value='Close' onClick='x999cal_clicked_day(1)'"
+ x999stylebut + ">";

this.day_table.innerHTML = str;
}

function funclose_button()
{

var dt1 = eval("document."+frm_name+"."+frm_fld);
var x999today = new Date();
var x999currentday = x999today.getDate();
var x999currentmonth = x999today.getMonth();
var x999currentyear = x999today.getFullYear();
dt1.value = x999currentday + '/' + x999currentmonth+1 + '/' +
x999currentyear;
}
function x999cal_popup_cal()
{
if (this.is_popup)
{
if (this.cal && this.window && !this.window.closed)
this.window.close();
else
{
this.create_cal();
this.show_days();
}
}
else
{
if (!this.cal)
{
this.create_cal();
this.show_days();
}
else
{
if (x999NS4compatible)
{
if (this.cal.visibility == 'show')
this.cal.visibility = 'hide';
else
this.cal.visibility = 'show';
}
else
{
if (this.cal.style.visibility == 'visible')
this.cal.style.visibility = 'hidden';
else
this.cal.style.visibility = 'visible';
}
}
}

}

function x999cal_new_year()
{

var month_select =
this.cal.document.forms[this.select_form_id]['month_sel'];
this.sel_month = new
Number(month_select.options[month_select.selectedIndex].value);
var year_select =
this.cal.document.forms[this.select_form_id]['year_sel'];
this.sel_year = new Number(year_select.value);
if ( (isNaN(parseInt(this.sel_year))) || (this.sel_year < x999lowyear)
|| (this.sel_year > x999highyear) )
{

window.alert('This is not a valid year.');
var x999today = new Date;
var yr = x999today.getFullYear();
this.sel_year = yr;
}
this.show_days();
function");

}

function x999cal_clicked_day(day)
{

day = 5;
alert(day);

if (this.is_popup)
this.window.close();
if (x999NS4compatible)
this.cal.visibility = 'hide';
else
this.cal.style.visibility = 'hidden';
var sel_date = new Date(this.sel_year, this.sel_month, day);
if (this.handler) this.handler(this, sel_date);

}

function twodigit(num)
{

var numStr = num + '';
if (numStr.length == 1)
{
numStr = "0" + numStr;
}

return numStr;

}

function righttwodigits(num)
{var numStr = num + '';
if (numStr.length == 4) {
numStr = numStr.substring(1,3);}

return numStr;
}

function get_days_in_month(mon, yr)
{

var month = new Number(mon);
var year = new Number(yr);
var mdays = [ [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] ];
var isleap =
(year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) ? 1 : 0;
return mdays[isleap][month];}
function my_date_selected(cal, date)
{
var dt = eval("document."+frm_name+"."+frm_fld);
dt.value = twodigit(date.getMonth() + 1) + '/' +
twodigit(date.getDate()) + '/' + date.getFullYear();
}
if i include window.close( for the close button, the whole parent
window is only closing. I want to close only the calendar.
vinu

1) What invokes the calendar; perhaps "x999cal(...)"?

2) "function x999cal_new_year()" contains the following line:

function");

Don't you get an error?

3) Why "var x999months" and "var x999monthabbs"; they're equal?
Jul 20 '05 #2

P: n/a
JRS: In article <80bPb.90337$sv6.289997@attbi_s52>, seen in
news:comp.lang.javascript, McKirahan <Ne**@McKirahan.com> posted at Tue,
20 Jan 2004 14:34:45 :-
Lines: 663

... ... ... ...
Please trim your quotes, as per FAQ. We've already seen all that
rubbish.

vinu

1) What invokes the calendar; perhaps "x999cal(...)"?

2) "function x999cal_new_year()" contains the following line:

function");

Don't you get an error?

3) Why "var x999months" and "var x999monthabbs"; they're equal?

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #3

P: n/a
JRS: In article <vi*********@mail.forum4designers.com>, seen in
news:comp.lang.javascript, vinu <vi*********@mail.forum4designers.com>
posted at Tue, 20 Jan 2004 07:55:23 :-

I have a javascript file named select.js. This is a file which is used
to pop up a calendar, when clicked on a calendar icon in an ASP file. I
have a close button in the calendar. When i click on the button, the
calendar is not closing.


Read the FAQ before posting to a newsgroup.

Code lines should be appropriately wrapped by hand, or written so that
they do not need it; do not let them be broken by inferior software, as
that makes your material illegible and unexecutable.

Your code is highly inefficient; if it is yours, you are evidently well
beyond your competence level.

Date validation, given Y. M, D as numbers or strings, requires two lines
of code. Not two pages.

A function to validate a string containing a date in numeric form, and
to return a Date Object or undefined, can be done in five lines.

Get yourself a proper news service, and proper standards-compliant
software to access it.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #4

P: n/a
rf

"vinu" <vi*********@mail.forum4designers.com> wrote in message
news:vi*********@mail.forum4designers.com...

<snip bulk code>

Posted via http://www.forum4designers.com

Do you realize that you are not posting to a webiste forum when you use this
site. They are passing your posts on to the usenet newsgroup
comp.lang.javascript

comp.lang.javascript is a publicly available newsgroup. The website you are
using is stealing its content directly from there and pretending that it is
their own. There is no original material at all on the website you are
looking at now. It is all coming directly from usenet.

I suggest you obtain a newsreader and visit us at
ews:comp.lang.javascript - you
will get a far better reaction to your question there.

Cheers
Richard.

Jul 20 '05 #5

P: n/a
rf

"Dr John Stockton" <sp**@merlyn.demon.co.uk> wrote in message
news:Zi**************@merlyn.demon.co.uk...
JRS: In article <vi*********@mail.forum4designers.com>, seen in
news:comp.lang.javascript, vinu <vi*********@mail.forum4designers.com>
posted at Tue, 20 Jan 2004 07:55:23 :-

I have a javascript file named select.js. This is a file which is used


Read the FAQ before posting to a newsgroup.


Dr John, these people are not aware the are posting to a newsgroup. Please
visit the offending web site mentioned in their sig. They think they are
posting to a private forum. See also my other post to this thread.

Cheers
Richard.

Jul 20 '05 #6

P: n/a
JRS: In article <Tz*****************@news-server.bigpond.net.au>, seen
in news:comp.lang.javascript, rf <ma**********@the.time> posted at Wed,
21 Jan 2004 12:49:55 :-

"Dr John Stockton" <sp**@merlyn.demon.co.uk> wrote in message
news:Zi**************@merlyn.demon.co.uk...
JRS: In article <vi*********@mail.forum4designers.com>, seen in
news:comp.lang.javascript, vinu <vi*********@mail.forum4designers.com>
posted at Tue, 20 Jan 2004 07:55:23 :-
>
>I have a javascript file named select.js. This is a file which is used


Read the FAQ before posting to a newsgroup.


Dr John, these people are not aware the are posting to a newsgroup.


That is their problem, not mine; I am sufficiently aware of the
situation. They are responsible for their own actions, which includes
their choice of service; and they must expect to receive appropriate
treatment. If they do not like that, they should complain to the owner
of the site that they use, for attempting unsuccessfully to deceive
them.

The owners of forum4designers indeed should have subscribed to the
newsgroup, read the FAQ, and asked for overwhelming consent - which
would, I trust, not have been granted - before doing what they have
done. And they should recommend strongly that their users, who can be
presumed to be naive, should read a group for a while, and seek its FAQ,
before writing to it.

--
© John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Jul 20 '05 #7

P: n/a
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
The owners of forum4designers indeed should have subscribed to the
newsgroup, read the FAQ, and asked for overwhelming consent - which
would, I trust, not have been granted - before doing what they have
done.


I don't see why they need consent. Usenet is not restricted to access
with a newsreader, and there are other web interfaces to other
newsgroups that work fine.

They should ofcourse be exepected to understand the medium and make an
effort to inform their users of what they are really accessing. If
they did so, we would just have to correct the occasional clueless who
don't read warnings anyway.

(This is how it works with the web-access to Danish web groups at the
html.dk web site - they did catch some flak until they made it more
visible that it was newsgroups, but now it's not a problem).

Now, if they *don't* make an effort to cooperate, the newsgroup will
just do as it usually does: police itself. That includes speaking ill
about their web site at every chance :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #8

P: n/a
"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:u1**********@hotpop.com...
Dr John Stockton <sp**@merlyn.demon.co.uk> writes: <snip>They should ofcourse be exepected to understand the medium
and make an effort to inform their users of what they are
really accessing.

<snip>

That is really the crux of the matter. forum4designers.com seem to be
actively trying to give the impression that the "forums" that they make
available are a service that they provide instead of an (inappropriately
formatted) reproduction of comp.lang.javascript discussions (along with
numerous other news groups).

It is the misrepresentation that is objected to not the web based
access. That is available at many sites including groups.google.com and
they are not that difficult to find. Try doing a web search from you
name on google, I get 10 pages of results mostly sites providing web
access to (or reporting of) comp.lang.javascript. The majority make no
pretence about the nature or origin of their content, for example:-

http://www.developersdex.com
http://www.mainframeforum.com

OTOH searching form my name turned up:-

http://www.tutorgig.com/

-who appear to be just a guilty of misrepresenting Usenet as their own
work as forum4designers.com (and similarities in presentation suggest
are using exactly the same software).

Richard.
Jul 20 '05 #9

P: n/a
Richard Cornford wrote:

http://www.tutorgig.com/

-who appear to be just a guilty of misrepresenting Usenet as their own
work as forum4designers.com (and similarities in presentation suggest
are using exactly the same software).


Thats one rude site there. :-x

--
Randy
Chance Favors The Prepared Mind

Jul 20 '05 #10

P: n/a
JRS: In article <u1**********@hotpop.com>, seen in
news:comp.lang.javascript, Lasse Reichstein Nielsen <lr*@hotpop.com>
posted at Thu, 22 Jan 2004 01:55:28 :-
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
The owners of forum4designers indeed should have subscribed to the
newsgroup, read the FAQ, and asked for overwhelming consent - which
would, I trust, not have been granted - before doing what they have
done.
I don't see why they need consent.


Good manners, at the very least; to enquire whether they would be
welcome, and what they should do to make that welcome less grudging
and/or more enthusiastic.
Usenet is not restricted to access
with a newsreader, and there are other web interfaces to other
newsgroups that work fine.
Those too should have asked; Usenet and newsreaders were designed for
each other, and an alien form of access does not necessarily fit well.
The only one I am familiar with is Google, which I believe to be both
honest and competent, and to provide additional services to the whole
Net community. But, in archiving permanently what was designed as an
ephemeral medium, they too are at fault.

They should ofcourse be exepected to understand the medium and make an
effort to inform their users of what they are really accessing. If
they did so, we would just have to correct the occasional clueless who
don't read warnings anyway.

(This is how it works with the web-access to Danish web groups at the
html.dk web site - they did catch some flak until they made it more
visible that it was newsgroups, but now it's not a problem).

Now, if they *don't* make an effort to cooperate, the newsgroup will
just do as it usually does: police itself. That includes speaking ill
about their web site at every chance :)


And of the naiveté of there users, on occasions where this is shown.

ISTM that FAQ S.3.2 could have a sentence recommending the use of a
well-written newsreader, and linking to a page that says more. It might
give examples of good newsreaders and of good Web interfaces, and refer
to the foibles and failings of some systems.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.