473,378 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Line 163 crossobj has no properties

I have tried to resolved this problem

but I dunno how to resolved it
can anyone help me??

It cannot be successfully displayed at the mozilla environment

// written by Tan Ling Wee on 2 Dec 2001
// last updated 23 June 2002
// email : fu*********@yahoo.com
// Modified by Paul Morel on 6 May 2003 -- Condensed and rearranged code

//You can edit these variables
var fixedX = -1 // x position (-1 if to appear below control)
var fixedY = -1 // y position (-1 if to appear below control)
var startAt = 1 // 0 - sunday ; 1 - monday
var showWeekNumber = 1 // 0 - don't show; 1 - show
var showToday = 1 // 0 - don't show; 1 - show
var imgDir = "/wms-img/popcal/" // directory for images ... e.g. var
imgDir="/img/"
var gotoString = "Go To Current Month"
var todayString = "Today is"
var weekString = "Wk"
var scrollLeftMessage = "Click to scroll to previous month. Hold mouse
button to scroll automatically."
var scrollRightMessage = "Click to scroll to next month. Hold mouse
button to scroll automatically."
var selectMonthMessage = "Click to select a month."
var selectYearMessage = "Click to select a year."
var selectDateMessage = "Select [date] as date." // do not replace
[date], it will be replaced by date.
var styleAnchor="text-decoration:none;color:black;"
var
styleLightBorder="border-style:solid;border-width:1px;border-color:#a0a0
a0;"
var monthName = new
Array("January","February","March","April","May"," June","July","August",
"September","October","November","December")
var imgsrc= new
Array("drop1.gif","drop2.gif","left1.gif","left2.g if","right1.gif","righ
t2.gif")

//Don't Edit these variables
var crossobj, crossMonthObj, crossYearObj, monthSelected, yearSelected,
dateSelected, omonthSelected, oyearSelected, odateSelected,
monthConstructed, yearConstructed, intervalID1, intervalID2, timeoutID1,
timeoutID2, ctlToPlaceValue, ctlNow, dateFormat, nStartingYear
var bPageLoaded=false
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var today = new Date()
var dateNow=today.getDate()
var monthNow=today.getMonth()
var yearNow=today.getYear()
var img = new Array()
var bShow = false;
var HolidaysCounter = 0
var Holidays = new Array()
function popUpCalendar(ctl,ctl2, format) {
var leftpos=0
var toppos=0
if (bPageLoaded){
if ( crossobj.visibility == "hidden" ) {
ctlToPlaceValue = ctl2
dateFormat=format;
formatChar = " "
aFormat = dateFormat.split(formatChar)
if (aFormat.length<3){
formatChar = "/"
aFormat = dateFormat.split(formatChar)
if (aFormat.length<3){
formatChar = "."
aFormat = dateFormat.split(formatChar)
if (aFormat.length<3){
formatChar = "-"
aFormat = dateFormat.split(formatChar)
if (aFormat.length<3){
// invalid date format
formatChar=""
}
}
}
}
tokensChanged = 0
if ( formatChar != "" ){
// use user's date
aData = ctl2.value.split(formatChar)
for (i=0;i<3;i++){
if ((aFormat[i]=="d") || (aFormat[i]=="dd")){
dateSelected = parseInt(aData[i], 10)
tokensChanged ++
}
else if ((aFormat[i]=="m") || (aFormat[i]=="mm")){
monthSelected = parseInt(aData[i], 10) - 1
tokensChanged ++
}
else if (aFormat[i]=="yyyy"){
yearSelected = parseInt(aData[i], 10)
tokensChanged ++
}
else if (aFormat[i]=="mmm"){
for (j=0; j<12; j++){
if (aData[i]==monthName[j]){
monthSelected=j
tokensChanged ++
}
}
}
}
}
if
((tokensChanged!=3)||isNaN(dateSelected)||isNaN(mo nthSelected)||isNaN(ye
arSelected)){
dateSelected = dateNow
monthSelected = monthNow
yearSelected = yearNow
}
odateSelected=dateSelected
omonthSelected=monthSelected
oyearSelected=yearSelected
aTag = ctl
do {
aTag = aTag.offsetParent;
leftpos += aTag.offsetLeft;
toppos += aTag.offsetTop;
} while(aTag.tagName!="BODY");
crossobj.left = fixedX==-1 ? ctl.offsetLeft + leftpos : fixedX
crossobj.top = fixedY==-1 ? ctl.offsetTop + toppos + ctl.offsetHeight
+ 2 : fixedY
constructCalendar (1, monthSelected, yearSelected);
crossobj.visibility=(dom||ie)? "visible" : "show"
hideElement( 'SELECT', document.getElementById("calendar") );
hideElement( 'APPLET', document.getElementById("calendar") );
bShow = true;
}
else{
hideCalendar()
if (ctlNow!=ctl) {popUpCalendar(ctl, ctl2, format)}
}
ctlNow = ctl
}
}

if (dom){
for (i=0;i<imgsrc.length;i++){
img[i] = new Image
img[i].src = imgDir + imgsrc[i]
}
document.write ("<div onclick='bShow=true'
id='calendar'style='z-index:+999;position:absolute;visibility:hidden;'><
table class=calTable width="+((showWeekNumber==1)?250:220)+"
style='font-family:arial;font-size:11px;border-width:1;border-style:soli
d;border-color:#a0a0a0;font-family:arial; font-size:11px}'
bgcolor='#ffffff'><tr class=calclass bgcolor='#0000aa'><td
class=calclass><table class=calclass
width='"+((showWeekNumber==1)?248:218)+"'><tr class=calclass><td
class=calclass style='padding:2px;font-family:arial;
font-size:11px;'><font color='#ffffff'><B><span
id='caption'></span></B></font></td><td class=calclass align=right><a
href='javascript:hideCalendar()'><IMG SRC='"+imgDir+"close.gif'
WIDTH='15' HEIGHT='13' BORDER='0' ALT='Close the
Calendar'></a></td></tr></table></td></tr><tr class=calclass><td
class=calclass style='padding:5px' bgcolor=#ffffff><span
id='content'></span></td></tr>")
if (showToday==1){
document.write ("<tr class=calclass bgcolor=#f0f0f0><td class=calclass
style='padding:5px' align=center><span id='lblToday'></span></td></tr>")
}
document.write ("</table></div><div id='selectMonth'
style='z-index:+999;position:absolute;visibility:hidden;'></div><div
id='selectYear'
style='z-index:+999;position:absolute;visibility:hidden;'></div>");
}
if (startAt==0){
dayName = new Array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
}
else{
dayName = new Array ("Mon","Tue","Wed","Thu","Fri","Sat","Sun")
}
document.onkeypress = function hidecal1 () {
if (event.keyCode==27){
hideCalendar()
}
}
document.onclick = function hidecal2 () {
if (!bShow){
hideCalendar()
}
bShow = false
}
if(ie){
init()
}
else{
window.onload=init
}

// hides <select> and <applet> objects (for IE only)
function hideElement( elmID, overDiv ){
if( ie ){
for( i = 0; i < document.all.tags( elmID ).length; i++ ){
obj = document.all.tags( elmID )[i];
if( !obj || !obj.offsetParent ){
continue;
}
// Find the element's offsetTop and offsetLeft relative to the BODY
tag.
objLeft = obj.offsetLeft;
objTop = obj.offsetTop;
objParent = obj.offsetParent;
while( objParent.tagName.toUpperCase() != "BODY" )
{
objLeft += objParent.offsetLeft;
objTop += objParent.offsetTop;
objParent = objParent.offsetParent;
}
objHeight = obj.offsetHeight;
objWidth = obj.offsetWidth;
if(( overDiv.offsetLeft + overDiv.offsetWidth ) <= objLeft );
else if(( overDiv.offsetTop + overDiv.offsetHeight ) <= objTop );
/* CHANGE by Charlie Roche for nested TDs*/
else if( overDiv.offsetTop >= ( objTop + objHeight + obj.height ));
/* END CHANGE */
else if( overDiv.offsetLeft >= ( objLeft + objWidth ));
else
{
obj.style.visibility = "hidden";
}
}
}
}

//unhides <select> and <applet> objects (for IE only)
function showElement( elmID ){
if( ie ){
for( i = 0; i < document.all.tags( elmID ).length; i++ ){
obj = document.all.tags( elmID )[i];
if( !obj || !obj.offsetParent ){
continue;
}
obj.style.visibility = "";
}
}
}

function HolidayRec (d, m, y, desc){
this.d = d
this.m = m
this.y = y
this.desc = desc
}

function addHoliday (d, m, y, desc){
Holidays[HolidaysCounter++] = new HolidayRec ( d, m, y, desc )
}

function swapImage(srcImg, destImg){
if (ie) { document.getElementById(srcImg).setAttribute("src" ,imgDir +
destImg) }
}

function init() {
if (!ns4)
{
if (!ie) { yearNow += 1900 }

crossobj=(dom)?document.getElementById("calendar") .style : ie?
document.all.calendar : document.calendar
hideCalendar()
crossMonthObj=(dom)?document.getElementById("selec tMonth").style : ie?
document.all.selectMonth : document.selectMonth
crossYearObj=(dom)?document.getElementById("select Year").style : ie?
document.all.selectYear : document.selectYear
monthConstructed=false;
yearConstructed=false;
if (showToday==1)
{
document.getElementById("lblToday").innerHTML = todayString + " <a
onmousemove='window.status=\""+gotoString+"\"'
onmouseout='window.status=\"\"' title='"+gotoString+"'
style='"+styleAnchor+"'
href='javascript:monthSelected=monthNow;yearSelect ed=yearNow;constructCa
lendar();'>"+dayName[(today.getDay()-startAt==-1)?6:(today.getDay()-star
tAt)]+", " + dateNow + " " + monthName[monthNow].substring(0,3) + " "
+ yearNow + "</a>"
}
sHTML1="<span
id='spanLeft' style='border-style:solid;border-width:1;border-color:#336
6FF;cursor:pointer'
onmouseover='swapImage(\"changeLeft\",\"left2.gif\ ");this.style.borderCo
lor=\"#88AAFF\";window.status=\""+scrollLeftMessag e+"\"'
onclick='javascript:decMonth()'
onmouseout='clearInterval(intervalID1);swapImage(\ "changeLeft\",\"left1.
gif\");this.style.borderColor=\"#3366FF\";window.s tatus=\"\"'
onmousedown='clearTimeout(timeoutID1);timeoutID1=s etTimeout(\"StartDecMo
nth()\",500)' onmouseup='clearTimeout(timeoutID1);clearInterval( interval
ID1)'>&nbsp<IMG id='changeLeft' SRC='"+imgDir+"left1.gif' width=10
height=11 BORDER=0>&nbsp</span>&nbsp;"
sHTML1+="<span id='spanRight'
style='border-style:solid;border-width:1;border-color:#3366FF;cursor:poi
nter' onmouseover='swapImage(\"changeRight\",\"right2.gi f\");this.style.
borderColor=\"#88AAFF\";window.status=\""+scrollRi ghtMessage+"\"'
onmouseout='clearInterval(intervalID1);swapImage(\ "changeRight\",\"right
1.gif\");this.style.borderColor=\"#3366FF\";window .status=\"\"'
onclick='incMonth()'
onmousedown='clearTimeout(timeoutID1);timeoutID1=s etTimeout(\"StartIncMo
nth()\",500)' onmouseup='clearTimeout(timeoutID1);clearInterval( interval
ID1)'>&nbsp<IMG id='changeRight' SRC='"+imgDir+"right1.gif' width=10
height=11 BORDER=0>&nbsp</span>&nbsp"
sHTML1+="<span id='spanMonth'
style='border-style:solid;border-width:1;border-color:#3366FF;cursor:poi
nter' onmouseover='swapImage(\"changeMonth\",\"drop2.gif \");this.style.b
orderColor=\"#88AAFF\";window.status=\""+selectMon thMessage+"\"'
onmouseout='swapImage(\"changeMonth\",\"drop1.gif\ ");this.style.borderCo
lor=\"#3366FF\";window.status=\"\"'
onclick='popUpMonth()'></span>&nbsp;"
sHTML1+="<span id='spanYear'
style='border-style:solid;border-width:1;border-color:#3366FF;cursor:poi
nter'
onmouseover='swapImage(\"changeYear\",\"drop2.gif\ ");this.style.borderCo
lor=\"#88AAFF\";window.status=\""+selectYearMessag e+"\"' onmouseout='swa
pImage(\"changeYear\",\"drop1.gif\");this.style.bo rderColor=\"#3366FF\";
window.status=\"\"' onclick='popUpYear()'></span>&nbsp;"
document.getElementById("caption").innerHTML = sHTML1
bPageLoaded=true
}
}

function hideCalendar() {
crossobj.visibility="hidden"
if (crossMonthObj != null){crossMonthObj.visibility="hidden"}
if (crossYearObj != null){crossYearObj.visibility="hidden"}
showElement( 'SELECT' );
showElement( 'APPLET' );
}

function padZero(num) {
return (num < 10)? '0' + num : num ;
}

function constructDate(d,m,y)
{
sTmp = dateFormat
sTmp = sTmp.replace ("dd","<e>")
sTmp = sTmp.replace ("d","<d>")
sTmp = sTmp.replace ("<e>",padZero(d))
sTmp = sTmp.replace ("<d>",d)
sTmp = sTmp.replace ("mmm","<o>")
sTmp = sTmp.replace ("mm","<n>")
sTmp = sTmp.replace ("m","<m>")
sTmp = sTmp.replace ("<m>",m+1)
sTmp = sTmp.replace ("<n>",padZero(m+1))
sTmp = sTmp.replace ("<o>",monthName[m])
return sTmp.replace ("yyyy",y)
}

function closeCalendar() {
var sTmp
hideCalendar();
ctlToPlaceValue.value
= constructDate(dateSelected,monthSelected,yearSelec ted)
}

// Month Pulldown
function StartDecMonth()
{
intervalID1=setInterval("decMonth()",80)
}

function StartIncMonth()
{
intervalID1=setInterval("incMonth()",80)
}

function incMonth () {
monthSelected++
if (monthSelected>11) {
monthSelected=0
yearSelected++
}
constructCalendar()
}

function decMonth () {
monthSelected--
if (monthSelected<0) {
monthSelected=11
yearSelected--
}
constructCalendar()
}

function constructMonth() {
popDownYear()
if (!monthConstructed) {
sHTML = ""
for (i=0; i<12; i++) {
sName = monthName[i];
if (i==monthSelected){
sName = "<B>" + sName + "</B>"
}
sHTML += "<tr class=calclass><td class=calclass id='m" + i + "'
onmouseover='this.style.backgroundColor=\"#FFCC99\ "'
onmouseout='this.style.backgroundColor=\"\"' style='cursor:pointer'
onclick='monthConstructed=false;monthSelected=" + i +
";constructCalendar();popDownMonth();event.cancelB ubble=true'>&nbsp;" +
sName + "&nbsp;</td></tr>"
}

document.getElementById("selectMonth").innerHTML = "<table
class=calclass width=70 style='font-family:arial; font-size:11px;
border-width:1; border-style:solid; border-color:#a0a0a0;'
bgcolor='#FFFFDD' cellspacing=0
onmouseover='clearTimeout(timeoutID1)' onmouseout='clearTimeout(timeoutI
D1);timeoutID1=setTimeout(\"popDownMonth()\",100); event.cancelBubble=tru
e'>" + sHTML + "</table>"
monthConstructed=true
}
}

function popUpMonth() {
constructMonth()
crossMonthObj.visibility = (dom||ie)? "visible" : "show"
crossMonthObj.left = parseInt(crossobj.left) + 50
crossMonthObj.top = parseInt(crossobj.top) + 26

hideElement( 'SELECT', document.getElementById("selectMonth") );
hideElement( 'APPLET', document.getElementById("selectMonth") );
}

function popDownMonth() {
crossMonthObj.visibility= "hidden"
}

// Year Pulldown
function incYear() {
for (i=0; i<7; i++){
newYear = (i+nStartingYear)+1
if (newYear==yearSelected)
{ txtYear = "&nbsp;<B>" + newYear + "</B>&nbsp;" }
else
{ txtYear = "&nbsp;" + newYear + "&nbsp;" }
document.getElementById("y"+i).innerHTML = txtYear
}
nStartingYear ++;
bShow=true
}

function decYear() {
for (i=0; i<7; i++){
newYear = (i+nStartingYear)-1
if (newYear==yearSelected)
{ txtYear = "&nbsp;<B>" + newYear + "</B>&nbsp;" }
else
{ txtYear = "&nbsp;" + newYear + "&nbsp;" }
document.getElementById("y"+i).innerHTML = txtYear
}
nStartingYear --;
bShow=true
}

function selectYear(nYear) {
yearSelected=parseInt(nYear+nStartingYear);
yearConstructed=false;
constructCalendar();
popDownYear();
}

function constructYear() {
popDownMonth()
sHTML = ""
if (!yearConstructed) {
sHTML = "<tr class=calclass><td class=calclass
align='center' onmouseover='this.style.backgroundColor=\"#FFCC99\ "'
onmouseout='clearInterval(intervalID1);this.style. backgroundColor=\"\"'
style='cursor:pointer' onmousedown='clearInterval(intervalID1);intervalI
D1=setInterval(\"decYear()\",30)'
onmouseup='clearInterval(intervalID1)'>-</td></tr>"
j = 0
nStartingYear = yearSelected-3
for (i=(yearSelected-3); i<=(yearSelected+3); i++) {
sName = i;
if (i==yearSelected){
sName = "<B>" + sName + "</B>"
}
sHTML += "<tr class=calclass><td class=calclass id='y" + j + "'
onmouseover='this.style.backgroundColor=\"#FFCC99\ "'
onmouseout='this.style.backgroundColor=\"\"' style='cursor:pointer'
onclick='selectYear("+j+");event.cancelBubble=true '>&nbsp;" + sName +
"&nbsp;</td></tr>"
j ++;
}
sHTML += "<tr class=calclass><td class=calclass align='center'
onmouseover='this.style.backgroundColor=\"#FFCC99\ "'
onmouseout='clearInterval(intervalID2);this.style. backgroundColor=\"\"'
style='cursor:pointer'
onmousedown='clearInterval(intervalID2);intervalID 2=setInterval(\"incYea
r()\",30)' onmouseup='clearInterval(intervalID2)'>+</td></tr>"
document.getElementById("selectYear").innerHTML = "<table
class=calclass width=44 style='font-family:arial; font-size:11px;
border-width:1; border-style:solid;
border-color:#a0a0a0;' bgcolor='#FFFFDD'
onmouseover='clearTimeout(timeoutID2)'
onmouseout='clearTimeout(timeoutID2);timeoutID2=se tTimeout(\"popDownYear
()\",100)' cellspacing=0>" + sHTML + "</table>"
yearConstructed = true
}
}

function popDownYear() {
clearInterval(intervalID1)
clearTimeout(timeoutID1)
clearInterval(intervalID2)
clearTimeout(timeoutID2)
crossYearObj.visibility= "hidden"
}

function popUpYear() {
var leftOffset
constructYear()
crossYearObj.visibility = (dom||ie)? "visible" : "show"
leftOffset = parseInt(crossobj.left) +
document.getElementById("spanYear").offsetLeft
if (ie){
leftOffset += 6
}
crossYearObj.left = leftOffset
crossYearObj.top = parseInt(crossobj.top) + 26
}

function WeekNbr(n) {
// Algorithm used:
// From Klaus Tondering's Calendar document (The Authority/Guru)
// hhtp://www.tondering.dk/claus/calendar.html
// a = (14-month) / 12
// y = year + 4800 - a
// m = month + 12a - 3
// J = day + (153m + 2) / 5 + 365y + y / 4 - y / 100 + y / 400 - 32045
// d4 = (J + 31741 - (J mod 7)) mod 146097 mod 36524 mod 1461
// L = d4 / 1460
// d1 = ((d4 - L) mod 365) + L
// WeekNumber = d1 / 7 + 1

year = n.getFullYear();
month = n.getMonth() + 1;
if (startAt == 0) {
day = n.getDate() + 1;
}
else {
day = n.getDate();
}
a = Math.floor((14-month) / 12);
y = year + 4800 - a;
m = month + 12 * a - 3;
b = Math.floor(y/4) - Math.floor(y/100) + Math.floor(y/400);
J = day + Math.floor((153 * m + 2) / 5) + 365 * y + b - 32045;
d4 = (((J + 31741 - (J % 7)) % 146097) % 36524) % 1461;
L = Math.floor(d4 / 1460);
d1 = ((d4 - L) % 365) + L;
week = Math.floor(d1/7) + 1;
return week;
}

function constructCalendar () {
var aNumDays = Array (31,0,31,30,31,30,31,31,30,31,30,31)
var dateMessage
var startDate = new Date (yearSelected,monthSelected,1)
var endDate
if (monthSelected==1){
endDate = new Date (yearSelected,monthSelected+1,1);
endDate = new Date (endDate - (24*60*60*1000));
numDaysInMonth = endDate.getDate()
}
else{
numDaysInMonth = aNumDays[monthSelected];
}
datePointer = 0
dayPointer = startDate.getDay() - startAt
if (dayPointer<0){
dayPointer = 6
}
sHTML = "<table class=calclass border=0
style='font-family:verdana;font-size:10px;'><tr class=calclass>"
if (showWeekNumber==1){
sHTML += "<td class=calclass width=27><b>" + weekString +
"</b></td><td class=calclass width=1 rowspan=7 bgcolor='#d0d0d0'
style='padding:0px'><img src='"+imgDir+"divider.gif' width=1></td>"
}
for (i=0; i<7; i++) {
sHTML += "<td class=calclass width='27' align='right'><B>"+
dayName[i]+"</B></td>"
}
sHTML +="</tr><tr class=calclass>"
if (showWeekNumber==1){
sHTML += "<td class=calclass align=right>" + WeekNbr(startDate) +
"&nbsp;</td>"
}
for ( var i=1; i<=dayPointer;i++ ){
sHTML += "<td class=calclass>&nbsp;</td>"
}
for ( datePointer=1; datePointer<=numDaysInMonth; datePointer++ ){
dayPointer++;
sHTML += "<td class=calclass align=right>"
sStyle=styleAnchor
if ((datePointer==odateSelected) && (monthSelected==omonthSelected) &&
(yearSelected==oyearSelected))
{ sStyle+=styleLightBorder }
sHint = ""
for (k=0;k<HolidaysCounter;k++){
if
((parseInt(Holidays[k].d)==datePointer)&&(parseInt(Holidays[k].m)==(mont
hSelected+1))){
if
((parseInt(Holidays[k].y)==0)||((parseInt(Holidays[k].y)==yearSelected)&
&(parseInt(Holidays[k].y)!=0))){
sStyle+="background-color:#FFDDDD;"
sHint+=sHint==""?Holidays[k].desc:"\n"+Holidays[k].desc
}
}
}
var regexp= /\"/g
sHint=sHint.replace(regexp,"&quot;")
dateMessage =
"onmousemove='window.status=\""+selectDateMessage. replace("[date]",const
ructDate(datePointer,monthSelected,yearSelected))+ "\"'
onmouseout='window.status=\"\"' "
if
((datePointer==dateNow)&&(monthSelected==monthNow) &&(yearSelected==yearN
ow))
{ sHTML += "<b><a "+dateMessage+" title=\"" + sHint + "\"
style='"+sStyle+"'
href='javascript:dateSelected="+datePointer+";clos eCalendar();'><font
color=#ff0000>&nbsp;" + datePointer + "</font>&nbsp;</a></b>"}
else if (dayPointer % 7 == (startAt * -1)+1)
{ sHTML += "<a "+dateMessage+" title=\"" + sHint + "\"
style='"+sStyle+"' href='javascript:dateSelected="+datePointer +
";closeCalendar();'>&nbsp;<font color=#909090>" + datePointer +
"</font>&nbsp;</a>" }
else
{ sHTML += "<a "+dateMessage+" title=\"" + sHint + "\"
style='"+sStyle+"' href='javascript:dateSelected="+datePointer +
";closeCalendar();'>&nbsp;" + datePointer + "&nbsp;</a>" }

sHTML += ""
if ((dayPointer+startAt) % 7 == startAt) {
sHTML += "</tr><tr class=calclass>"
if ((showWeekNumber==1)&&(datePointer<numDaysInMonth) ){
sHTML += "<td class=calclass align=right>" + (WeekNbr(new
Date(yearSelected,monthSelected,datePointer+1))) + "&nbsp;</td>"
}
}
}
document.getElementById("content").innerHTML = sHTML
document.getElementById("spanMonth").innerHTML = "&nbsp;" +
monthName[monthSelected] + "&nbsp;<IMG id='changeMonth'
SRC='"+imgDir+"drop1.gif' WIDTH='12' HEIGHT='10' BORDER=0>"
document.getElementById("spanYear").innerHTML = "&nbsp;" +
yearSelected + "&nbsp;<IMG id='changeYear' SRC='"+imgDir+"drop1.gif'
WIDTH='12' HEIGHT='10' BORDER=0>"
}

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
4 3744
susanlimsg lim wrote:

Because your code has been automatically wrapped, the concept of
"line 163" lost all relevance.
I have tried to resolved this problem
You need to post just very small bit of code that displays the
problem, or provide a link to a web page with explicit
instructions as to what *should* happen and what *does* happen.

The code you posted does not work at all in any
environment because of the very, very long lines of code with no
spaces that have been automatically broken.

I tried to restore your code, and whilst it does create some
page elements, it fails to actually display anything. Same for
IE, which gives a meaningless error:

Line 1, char 51, ';' expected ...

But line 1 doesn't even have 51 characters...

but I dunno how to resolved it
can anyone help me??
In your code's currently posted state, I doubt it.

It cannot be successfully displayed at the mozilla environment


See above. Until whatever you post actually displays in a
browser, you probably wont get any helpful answers.
[...]

--
Fred
Jul 23 '05 #2


Thank you Fred

I have resolved the problem

regards

susan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
JRS: In article <42**********@127.0.0.1>, dated Sun, 20 Feb 2005
22:55:05, seen in news:comp.lang.javascript, susanlimsg lim
<su*******@boonsoftware.com> posted :

function WeekNbr(n) {
...
year = n.getFullYear();
month = n.getMonth() + 1;
if (startAt == 0) {
day = n.getDate() + 1;
}
else {
day = n.getDate();
}
a = Math.floor((14-month) / 12);
y = year + 4800 - a;
m = month + 12 * a - 3;
b = Math.floor(y/4) - Math.floor(y/100) + Math.floor(y/400);
J = day + Math.floor((153 * m + 2) / 5) + 365 * y + b - 32045;
d4 = (((J + 31741 - (J % 7)) % 146097) % 36524) % 1461;
L = Math.floor(d4 / 1460);
d1 = ((d4 - L) % 365) + L;
week = Math.floor(d1/7) + 1;
return week;
}
Unnecessarily complicated. Get week number from its definition, not by
going via some sort of JDN. Read the newsgroup FAQ. Note : if you are
American, that definition of Week Number will not suffice, because it is
the International Standard, and Americans think that International means
Foreign. Any adequate code for Week Number, unless executed only for
Thursdays, needs also to return the Year Number.

if (monthSelected==1){
endDate = new Date (yearSelected,monthSelected+1,1);
endDate = new Date (endDate - (24*60*60*1000));
numDaysInMonth = endDate.getDate()


Unnecessarily complicated. endDate = new Date(Y, 2, 0).getDate() should
work on all browsers. Replace 2 by the real month number, and it will
work for all months after September 1752 or local equivalent. Or, for
speed, seek treatments not using Date Objects.
Your article is inadequately presented for further comment.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of 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 23 '05 #4

For me also the same error "crossobj has no properties" is occuring
while running in mozilla browser for the same calender.Plz help me to
solve this problem
Thanks u in advance
by N.Jayaram











*** Sent via Developersdex http://www.developersdex.com ***
Jan 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Hari | last post by:
can i have command line arguments in VS.NET applicatio? if yes how? Can i have some code snippets of the above functionality? I know we can acjieve this in console application form command...
1
by: rforman1 | last post by:
I have found many threads with this question asked and ostensibly answered, but none with an example of how exactly to do it. Help! I know that in order to set up the values of command line...
11
by: Ken Varn | last post by:
I want to be able to determine my current line, file, and function in my C# application. I know that C++ has the __LINE__, __FUNCTION__, and __FILE___ macros for getting this, but I cannot find a...
7
by: Jacky Luk | last post by:
Does anyone know of a downloadable Line ActiveX control which allows me to plot straight lines on a VC++.NET form? Thanks Jack
1
by: jayaram n | last post by:
how to correct the crossobj has no property error in mozilla *** Sent via Developersdex http://www.developersdex.com ***
4
by: Roland | last post by:
Hi, I am developing a C++ project and want to pass some command line arguments in VS .NET 2003. I am in debug mode, the configuration is set to Debug and I entered my argument list in Project ->...
1
by: rajesh | last post by:
Hi all; For me also the same error "crossobj has no properties" is occuring while running in mozilla browser for the same calender.Plz help me to solve this problem with coding as soon as...
1
by: rajesh | last post by:
var fixedX = -1 // x position (-1 if to appear below control) var fixedY = -1 // y position (-1 if to appear below control) var startAt = 0 // 0 - sunday ; 1 - monday var showWeekNumber =...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.