Click to See Complete Forum and Search --> : Need help with this ASP error


Will192
12-16-2002, 11:57 AM
I am getting an error in Internet Explorer and don't understand what is wrong. Here is the error details that come up on IE:

Line : 203
Char 1
Error : Object Expected
Code :0
URL : http://tresdev/repvacation.asp?suitsid=WS5926&parent=USER&access=0

Here is the lines of code that it is referencing:

199 : // Check that month is between 1 &12.
200 : if(month<=0 || month>=13) { err=true;}
201 : // Check that day is right depending on month.
202 : if( month==2 && ((year/4)==parseInt(year/4)) ) { if(day<=0 || day>29) {err=true; }}
203 : if( month==2 && ((year/4)!=parseInt(year/4)) ) { if(day<=0 || day>28) {err=true; }}
204 : if( month==4 || month==6 || month==9 || month==11 ) { if(day<=0 || day>30) {err=true; }}
205 : if( month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12 ) { if(day<=0 || 206 : day>31) {err=true; } }
207 : // Check that year is OK
208 : //if(year<=0 || year>99) {err=true;}
209 : // If anything appears incorrect, display error message.

The line number and the colons are not in the script. I don't see the error here. Can the 'object expected' error mean many different things?

Thanks in advance for any replies to this post.
My server setup is in my signature.

Will

khalidali63
12-16-2002, 12:15 PM
"Object Expected" usually means that at any given point in your html a variable or a function is being used without being defined. therefore please take look at the deffinitions and declarations of your functions/variables

I hope it guides you to right direction..
cheers

Khalid

Will192
12-16-2002, 01:13 PM
Thanks for your reply. Does the line number given for the error have any relevance to the error?

Will

khalidali63
12-16-2002, 02:54 PM
from the code which you have posted,I can't really tell, you may need to post detailed code segment or e-mail me the whole content of the page

at
k_ali@shaw.ca

Khalid

Will192
12-16-2002, 03:18 PM
My mistake, here is the real lines the error was pointing to:

200 : <DIV ALIGN=CENTER>
201 : <INPUT ALIGN=RIGHT TYPE=BUTTON NAME=REDIRECT STYLE='background-color: #ffffff; cursor : hand' ONCLICK="javascript:window.location='http://tresdev/login.asp'" VALUE="Logout">
202 : <INPUT ALIGN=RIGHT TYPE=RESET NAME=Reset STYLE='background-color: #ffffff; cursor : hand' VALUE='Reset'>
203 : <INPUT ALIGN=RIGHT TYPE=BUTTON NAME=Validate STYLE='background-color: #ffffff; cursor : hand' ONCLICK="javascript:isValid( frmVacationData.txtVacDate,frmVacationData.txtReserveDate,'STLX',3);" VALUE='Validate'>
204 : </DIV>

I was looking at the source code, not the code that the browser generates.