473,714 Members | 5,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*********@yah oo.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 scrollLeftMessa ge = "Click to scroll to previous month. Hold mouse
button to scroll automatically."
var scrollRightMess age = "Click to scroll to next month. Hold mouse
button to scroll automatically."
var selectMonthMess age = "Click to select a month."
var selectYearMessa ge = "Click to select a year."
var selectDateMessa ge = "Select [date] as date." // do not replace
[date], it will be replaced by date.
var styleAnchor="te xt-decoration:none ;color:black;"
var
styleLightBorde r="border-style:solid;bor der-width:1px;borde r-color:#a0a0
a0;"
var monthName = new
Array("January" ,"February","Ma rch","April","M ay","June","Jul y","August",
"September","Oc tober","Novembe r","December ")
var imgsrc= new
Array("drop1.gi f","drop2.gif", "left1.gif","le ft2.gif","right 1.gif","righ
t2.gif")

//Don't Edit these variables
var crossobj, crossMonthObj, crossYearObj, monthSelected, yearSelected,
dateSelected, omonthSelected, oyearSelected, odateSelected,
monthConstructe d, yearConstructed , intervalID1, intervalID2, timeoutID1,
timeoutID2, ctlToPlaceValue , ctlNow, dateFormat, nStartingYear
var bPageLoaded=fal se
var ie=document.all
var dom=document.ge tElementById
var ns4=document.la yers
var today = new Date()
var dateNow=today.g etDate()
var monthNow=today. getMonth()
var yearNow=today.g etYear()
var img = new Array()
var bShow = false;
var HolidaysCounter = 0
var Holidays = new Array()
function popUpCalendar(c tl,ctl2, format) {
var leftpos=0
var toppos=0
if (bPageLoaded){
if ( crossobj.visibi lity == "hidden" ) {
ctlToPlaceValue = ctl2
dateFormat=form at;
formatChar = " "
aFormat = dateFormat.spli t(formatChar)
if (aFormat.length <3){
formatChar = "/"
aFormat = dateFormat.spli t(formatChar)
if (aFormat.length <3){
formatChar = "."
aFormat = dateFormat.spli t(formatChar)
if (aFormat.length <3){
formatChar = "-"
aFormat = dateFormat.spli t(formatChar)
if (aFormat.length <3){
// invalid date format
formatChar=""
}
}
}
}
tokensChanged = 0
if ( formatChar != "" ){
// use user's date
aData = ctl2.value.spli t(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(dat eSelected)||isN aN(monthSelecte d)||isNaN(ye
arSelected)){
dateSelected = dateNow
monthSelected = monthNow
yearSelected = yearNow
}
odateSelected=d ateSelected
omonthSelected= monthSelected
oyearSelected=y earSelected
aTag = ctl
do {
aTag = aTag.offsetPare nt;
leftpos += aTag.offsetLeft ;
toppos += aTag.offsetTop;
} while(aTag.tagN ame!="BODY");
crossobj.left = fixedX==-1 ? ctl.offsetLeft + leftpos : fixedX
crossobj.top = fixedY==-1 ? ctl.offsetTop + toppos + ctl.offsetHeigh t
+ 2 : fixedY
constructCalend ar (1, monthSelected, yearSelected);
crossobj.visibi lity=(dom||ie)? "visible" : "show"
hideElement( 'SELECT', document.getEle mentById("calen dar") );
hideElement( 'APPLET', document.getEle mentById("calen dar") );
bShow = true;
}
else{
hideCalendar()
if (ctlNow!=ctl) {popUpCalendar( ctl, ctl2, format)}
}
ctlNow = ctl
}
}

if (dom){
for (i=0;i<imgsrc.l ength;i++){
img[i] = new Image
img[i].src = imgDir + imgsrc[i]
}
document.write ("<div onclick='bShow= true'
id='calendar'st yle='z-index:+999;posi tion:absolute;v isibility:hidde n;'><
table class=calTable width="+((showW eekNumber==1)?2 50:220)+"
style='font-family:arial;fo nt-size:11px;borde r-width:1;border-style:soli
d;border-color:#a0a0a0;f ont-family:arial; font-size:11px}'
bgcolor='#fffff f'><tr class=calclass bgcolor='#0000a a'><td
class=calclass> <table class=calclass
width='"+((show WeekNumber==1)? 248:218)+"'><tr class=calclass> <td
class=calclass style='padding: 2px;font-family:arial;
font-size:11px;'><fo nt color='#ffffff' ><B><span
id='caption'></span></B></font></td><td class=calclass align=right><a
href='javascrip t: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><s pan id='lblToday'></span></td></tr>")
}
document.write ("</table></div><div id='selectMonth '
style='z-index:+999;posi tion:absolute;v isibility:hidde n;'></div><div
id='selectYear'
style='z-index:+999;posi tion:absolute;v isibility:hidde n;'></div>");
}
if (startAt==0){
dayName = new Array ("Sun","Mon","T ue","Wed","Thu" ,"Fri","Sat" )
}
else{
dayName = new Array ("Mon","Tue","W ed","Thu","Fri" ,"Sat","Sun" )
}
document.onkeyp ress = function hidecal1 () {
if (event.keyCode= =27){
hideCalendar()
}
}
document.onclic k = function hidecal2 () {
if (!bShow){
hideCalendar()
}
bShow = false
}
if(ie){
init()
}
else{
window.onload=i nit
}

// hides <select> and <applet> objects (for IE only)
function hideElement( elmID, overDiv ){
if( ie ){
for( i = 0; i < document.all.ta gs( elmID ).length; i++ ){
obj = document.all.ta gs( elmID )[i];
if( !obj || !obj.offsetPare nt ){
continue;
}
// Find the element's offsetTop and offsetLeft relative to the BODY
tag.
objLeft = obj.offsetLeft;
objTop = obj.offsetTop;
objParent = obj.offsetParen t;
while( objParent.tagNa me.toUpperCase( ) != "BODY" )
{
objLeft += objParent.offse tLeft;
objTop += objParent.offse tTop;
objParent = objParent.offse tParent;
}
objHeight = obj.offsetHeigh t;
objWidth = obj.offsetWidth ;
if(( overDiv.offsetL eft + overDiv.offsetW idth ) <= objLeft );
else if(( overDiv.offsetT op + overDiv.offsetH eight ) <= objTop );
/* CHANGE by Charlie Roche for nested TDs*/
else if( overDiv.offsetT op >= ( objTop + objHeight + obj.height ));
/* END CHANGE */
else if( overDiv.offsetL eft >= ( objLeft + objWidth ));
else
{
obj.style.visib ility = "hidden";
}
}
}
}

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

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(srcIm g, destImg){
if (ie) { document.getEle mentById(srcImg ).setAttribute( "src",imgDi r +
destImg) }
}

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

crossobj=(dom)? document.getEle mentById("calen dar").style : ie?
document.all.ca lendar : document.calend ar
hideCalendar()
crossMonthObj=( dom)?document.g etElementById(" selectMonth").s tyle : ie?
document.all.se lectMonth : document.select Month
crossYearObj=(d om)?document.ge tElementById("s electYear").sty le : ie?
document.all.se lectYear : document.select Year
monthConstructe d=false;
yearConstructed =false;
if (showToday==1)
{
document.getEle mentById("lblTo day").innerHTM L = todayString + " <a
onmousemove='wi ndow.status=\"" +gotoString+"\" '
onmouseout='win dow.status=\"\" ' title='"+gotoSt ring+"'
style='"+styleA nchor+"'
href='javascrip t:monthSelected =monthNow;yearS elected=yearNow ;constructCa
lendar();'>"+da yName[(today.getDay()-startAt==-1)?6:(today.get Day()-star
tAt)]+", " + dateNow + " " + monthName[monthNow].substring(0,3) + " "
+ yearNow + "</a>"
}
sHTML1="<span
id='spanLeft' style='border-style:solid;bor der-width:1;border-color:#336
6FF;cursor:poin ter'
onmouseover='sw apImage(\"chang eLeft\",\"left2 .gif\");this.st yle.borderCo
lor=\"#88AAFF\" ;window.status= \""+scrollLeftM essage+"\"'
onclick='javasc ript:decMonth() '
onmouseout='cle arInterval(inte rvalID1);swapIm age(\"changeLef t\",\"left1.
gif\");this.sty le.borderColor= \"#3366FF\";win dow.status=\"\" '
onmousedown='cl earTimeout(time outID1);timeout ID1=setTimeout( \"StartDecMo
nth()\",500)' onmouseup='clea rTimeout(timeou tID1);clearInte rval(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;bor der-width:1;border-color:#3366FF;c ursor:poi
nter' onmouseover='sw apImage(\"chang eRight\",\"righ t2.gif\");this. style.
borderColor=\"# 88AAFF\";window .status=\""+scr ollRightMessage +"\"'
onmouseout='cle arInterval(inte rvalID1);swapIm age(\"changeRig ht\",\"right
1.gif\");this.s tyle.borderColo r=\"#3366FF\";w indow.status=\" \"'
onclick='incMon th()'
onmousedown='cl earTimeout(time outID1);timeout ID1=setTimeout( \"StartIncMo
nth()\",500)' onmouseup='clea rTimeout(timeou tID1);clearInte rval(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;bor der-width:1;border-color:#3366FF;c ursor:poi
nter' onmouseover='sw apImage(\"chang eMonth\",\"drop 2.gif\");this.s tyle.b
orderColor=\"#8 8AAFF\";window. status=\""+sele ctMonthMessage+ "\"'
onmouseout='swa pImage(\"change Month\",\"drop1 .gif\");this.st yle.borderCo
lor=\"#3366FF\" ;window.status= \"\"'
onclick='popUpM onth()'></span>&nbsp;"
sHTML1+="<span id='spanYear'
style='border-style:solid;bor der-width:1;border-color:#3366FF;c ursor:poi
nter'
onmouseover='sw apImage(\"chang eYear\",\"drop2 .gif\");this.st yle.borderCo
lor=\"#88AAFF\" ;window.status= \""+selectYearM essage+"\"' onmouseout='swa
pImage(\"change Year\",\"drop1. gif\");this.sty le.borderColor= \"#3366FF\";
window.status=\ "\"' onclick='popUpY ear()'></span>&nbsp;"
document.getEle mentById("capti on").innerHTM L = sHTML1
bPageLoaded=tru e
}
}

function hideCalendar() {
crossobj.visibi lity="hidden"
if (crossMonthObj != null){crossMont hObj.visibility ="hidden"}
if (crossYearObj != null){crossYear Obj.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>",monthNam e[m])
return sTmp.replace ("yyyy",y)
}

function closeCalendar() {
var sTmp
hideCalendar();
ctlToPlaceValue .value
= constructDate(d ateSelected,mon thSelected,year Selected)
}

// Month Pulldown
function StartDecMonth()
{
intervalID1=set Interval("decMo nth()",80)
}

function StartIncMonth()
{
intervalID1=set Interval("incMo nth()",80)
}

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

function decMonth () {
monthSelected--
if (monthSelected< 0) {
monthSelected=1 1
yearSelected--
}
constructCalend ar()
}

function constructMonth( ) {
popDownYear()
if (!monthConstruc ted) {
sHTML = ""
for (i=0; i<12; i++) {
sName = monthName[i];
if (i==monthSelect ed){
sName = "<B>" + sName + "</B>"
}
sHTML += "<tr class=calclass> <td class=calclass id='m" + i + "'
onmouseover='th is.style.backgr oundColor=\"#FF CC99\"'
onmouseout='thi s.style.backgro undColor=\"\"' style='cursor:p ointer'
onclick='monthC onstructed=fals e;monthSelected =" + i +
";constructCale ndar();popDownM onth();event.ca ncelBubble=true '>&nbsp;" +
sName + "&nbsp;</td></tr>"
}

document.getEle mentById("selec tMonth").innerH TML = "<table
class=calclass width=70 style='font-family:arial; font-size:11px;
border-width:1; border-style:solid; border-color:#a0a0a0;'
bgcolor='#FFFFD D' cellspacing=0
onmouseover='cl earTimeout(time outID1)' onmouseout='cle arTimeout(timeo utI
D1);timeoutID1= setTimeout(\"po pDownMonth()\", 100);event.canc elBubble=tru
e'>" + sHTML + "</table>"
monthConstructe d=true
}
}

function popUpMonth() {
constructMonth( )
crossMonthObj.v isibility = (dom||ie)? "visible" : "show"
crossMonthObj.l eft = parseInt(crosso bj.left) + 50
crossMonthObj.t op = parseInt(crosso bj.top) + 26

hideElement( 'SELECT', document.getEle mentById("selec tMonth") );
hideElement( 'APPLET', document.getEle mentById("selec tMonth") );
}

function popDownMonth() {
crossMonthObj.v isibility= "hidden"
}

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

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

function selectYear(nYea r) {
yearSelected=pa rseInt(nYear+nS tartingYear);
yearConstructed =false;
constructCalend ar();
popDownYear();
}

function constructYear() {
popDownMonth()
sHTML = ""
if (!yearConstruct ed) {
sHTML = "<tr class=calclass> <td class=calclass
align='center' onmouseover='th is.style.backgr oundColor=\"#FF CC99\"'
onmouseout='cle arInterval(inte rvalID1);this.s tyle.background Color=\"\"'
style='cursor:p ointer' onmousedown='cl earInterval(int ervalID1);inter valI
D1=setInterval( \"decYear()\",3 0)'
onmouseup='clea rInterval(inter valID1)'>-</td></tr>"
j = 0
nStartingYear = yearSelected-3
for (i=(yearSelecte d-3); i<=(yearSelecte d+3); i++) {
sName = i;
if (i==yearSelecte d){
sName = "<B>" + sName + "</B>"
}
sHTML += "<tr class=calclass> <td class=calclass id='y" + j + "'
onmouseover='th is.style.backgr oundColor=\"#FF CC99\"'
onmouseout='thi s.style.backgro undColor=\"\"' style='cursor:p ointer'
onclick='select Year("+j+");eve nt.cancelBubble =true'>&nbsp;" + sName +
"&nbsp;</td></tr>"
j ++;
}
sHTML += "<tr class=calclass> <td class=calclass align='center'
onmouseover='th is.style.backgr oundColor=\"#FF CC99\"'
onmouseout='cle arInterval(inte rvalID2);this.s tyle.background Color=\"\"'
style='cursor:p ointer'
onmousedown='cl earInterval(int ervalID2);inter valID2=setInter val(\"incYea
r()\",30)' onmouseup='clea rInterval(inter valID2)'>+</td></tr>"
document.getEle mentById("selec tYear").innerHT ML = "<table
class=calclass width=44 style='font-family:arial; font-size:11px;
border-width:1; border-style:solid;
border-color:#a0a0a0;' bgcolor='#FFFFD D'
onmouseover='cl earTimeout(time outID2)'
onmouseout='cle arTimeout(timeo utID2);timeoutI D2=setTimeout(\ "popDownYea r
()\",100)' cellspacing=0>" + sHTML + "</table>"
yearConstructed = true
}
}

function popDownYear() {
clearInterval(i ntervalID1)
clearTimeout(ti meoutID1)
clearInterval(i ntervalID2)
clearTimeout(ti meoutID2)
crossYearObj.vi sibility= "hidden"
}

function popUpYear() {
var leftOffset
constructYear()
crossYearObj.vi sibility = (dom||ie)? "visible" : "show"
leftOffset = parseInt(crosso bj.left) +
document.getEle mentById("spanY ear").offsetLef t
if (ie){
leftOffset += 6
}
crossYearObj.le ft = leftOffset
crossYearObj.to p = parseInt(crosso bj.top) + 26
}

function WeekNbr(n) {
// Algorithm used:
// From Klaus Tondering's Calendar document (The Authority/Guru)
// hhtp://www.tondering.d k/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 constructCalend ar () {
var aNumDays = Array (31,0,31,30,31, 30,31,31,30,31, 30,31)
var dateMessage
var startDate = new Date (yearSelected,m onthSelected,1)
var endDate
if (monthSelected= =1){
endDate = new Date (yearSelected,m onthSelected+1, 1);
endDate = new Date (endDate - (24*60*60*1000) );
numDaysInMonth = endDate.getDate ()
}
else{
numDaysInMonth = aNumDays[monthSelected];
}
datePointer = 0
dayPointer = startDate.getDa y() - 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='#d0d0d 0'
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(startDa te) +
"&nbsp;</td>"
}
for ( var i=1; i<=dayPointer;i ++ ){
sHTML += "<td class=calclass> &nbsp;</td>"
}
for ( datePointer=1; datePointer<=nu mDaysInMonth; datePointer++ ){
dayPointer++;
sHTML += "<td class=calclass align=right>"
sStyle=styleAnc hor
if ((datePointer== odateSelected) && (monthSelected= =omonthSelected ) &&
(yearSelected== oyearSelected))
{ sStyle+=styleLi ghtBorder }
sHint = ""
for (k=0;k<Holidays Counter;k++){
if
((parseInt(Holi days[k].d)==datePointe r)&&(parseInt(H olidays[k].m)==(mont
hSelected+1))){
if
((parseInt(Holi days[k].y)==0)||((pars eInt(Holidays[k].y)==yearSelect ed)&
&(parseInt(Holi days[k].y)!=0))){
sStyle+="backgr ound-color:#FFDDDD;"
sHint+=sHint==" "?Holidays[k].desc:"\n"+Holi days[k].desc
}
}
}
var regexp= /\"/g
sHint=sHint.rep lace(regexp,"&q uot;")
dateMessage =
"onmousemove='w indow.status=\" "+selectDateMes sage.replace("[date]",const
ructDate(datePo inter,monthSele cted,yearSelect ed))+"\"'
onmouseout='win dow.status=\"\" ' "
if
((datePointer== dateNow)&&(mont hSelected==mont hNow)&&(yearSel ected==yearN
ow))
{ sHTML += "<b><a "+dateMessa ge+" title=\"" + sHint + "\"
style='"+sStyle +"'
href='javascrip t:dateSelected= "+datePointer+" ;closeCalendar( );'><font
color=#ff0000>& nbsp;" + datePointer + "</font>&nbsp;</a></b>"}
else if (dayPointer % 7 == (startAt * -1)+1)
{ sHTML += "<a "+dateMessa ge+" title=\"" + sHint + "\"
style='"+sStyle +"' href='javascrip t:dateSelected= "+datePoint er +
";closeCalendar ();'>&nbsp;<fon t color=#909090>" + datePointer +
"</font>&nbsp;</a>" }
else
{ sHTML += "<a "+dateMessa ge+" title=\"" + sHint + "\"
style='"+sStyle +"' href='javascrip t:dateSelected= "+datePoint er +
";closeCalendar ();'>&nbsp;" + datePointer + "&nbsp;</a>" }

sHTML += ""
if ((dayPointer+st artAt) % 7 == startAt) {
sHTML += "</tr><tr class=calclass> "
if ((showWeekNumbe r==1)&&(datePoi nter<numDaysInM onth)){
sHTML += "<td class=calclass align=right>" + (WeekNbr(new
Date(yearSelect ed,monthSelecte d,datePointer+1 ))) + "&nbsp;</td>"
}
}
}
document.getEle mentById("conte nt").innerHTM L = sHTML
document.getEle mentById("spanM onth").innerHTM L = "&nbsp;" +
monthName[monthSelected] + "&nbsp;<IMG id='changeMonth '
SRC='"+imgDir+" drop1.gif' WIDTH='12' HEIGHT='10' BORDER=0>"
document.getEle mentById("spanY ear").innerHTM L = "&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 3762
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**********@1 27.0.0.1>, dated Sun, 20 Feb 2005
22:55:05, seen in news:comp.lang. javascript, susanlimsg lim
<su*******@boon software.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,m onthSelected+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.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.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
2608
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 prompt but how can i achieve it in an application in VS.NET? Thank you
1
2065
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 arguments from within the IDE, I go to Project Properties, Configuration Properties, and then the text box labeled "Command Line Arguments" under the label "Start Options." But what exactly do I put into that text box? What I want to do is set up a...
11
21925
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 C# equivalent. Any ideas? -- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. varnk@diebold.com
7
1519
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
1708
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
1984
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 -> Project Properties -> Configuration Properties -> Debugging -> Command Arguments. The blurb provided in the properties window for this field reads "The command line arguments to pass to the application." which sounded promising.
1
1503
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 possible. Thanks u in advance by N.Jayaram
1
2308
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 = 0 // 0 - don't show; 1 - show var showToday = 1 // 0 - don't show; 1 - show var imgDir = "images/" // directory for images ... e.g. var imgDir="/img/" var gotoString = "Go To Current Month" var todayString = "Today is"
7
9365
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 display the Windows form. The form is being displayed but the command only returns when the form is closed. I want the command line to return immediately, leaving the form displayed.
0
8808
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8712
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9316
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9179
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9077
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
3160
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2525
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2113
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.