wierd error message in asp page
wierd error message in asp page
am 30.04.2007 22:38:00 von bettys
Hi all,
I have a page when run in browser(firefox), it has some error message from
from javascript console. It says
Error: Expected ':' but found ';'. Declaration dropped.
Source File: https://www.xxx.com/select2007_step1.asp
Line: 0
Bu the first 10 line of code are:
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>
Flexible Travel Insurance Quote
It seems to me that it has nothing to do Javascript, it is asp.
Can you shed a light on me?
After I remove this part:<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>
It still give me the error message.
Betty
Re: wierd error message in asp page
am 30.04.2007 23:03:01 von reb01501
c676228 wrote:
> Hi all,
> I have a page when run in browser(firefox), it has some error message
> from from javascript console. It says
> Error: Expected ':' but found ';'. Declaration dropped.
> Source File: https://www.xxx.com/select2007_step1.asp
> Line: 0
>
> Bu the first 10 line of code are:
>
> <%
> pStr = "private, no-cache, must-revalidate"
> Response.ExpiresAbsolute = #2000-01-01#
> Response.AddHeader "pragma", "no-cache"
> Response.AddHeader "cache-control", pStr
> %>
>
>
> Flexible Travel Insurance Quote
>
> It seems to me that it has nothing to do Javascript, it is asp.
Why? What is making you say that? Why would an ASP vbscript error be
raised in a Javascript console?
> Can you shed a light on me?
> After I remove this part:<%
> pStr = "private, no-cache, must-revalidate"
> Response.ExpiresAbsolute = #2000-01-01#
> Response.AddHeader "pragma", "no-cache"
> Response.AddHeader "cache-control", pStr
> %>
> It still give me the error message.
>
And if you remove every other bit of ASP code, I bet you will still get
the error ... unless removing the ASP code causes you to inadvertantly
fix or delete the javascript code that is causing the error.
Your problem is in a line of code containing a colon, probably a var
statement. The error it is causing is preventing the rest of the code in
the page from executing leading to the confusion.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: wierd error message in asp page
am 30.04.2007 23:18:00 von bettys
HI Bob,
i always use firefox javaconsole to debug my javascript and it seems it
always give the right line number all the time. That's why I am so confused
when I look at the so-called line 0.
I will look at if there is : in the javascript.
Thanks you
--
Betty
"Bob Barrows [MVP]" wrote:
> c676228 wrote:
> > Hi all,
> > I have a page when run in browser(firefox), it has some error message
> > from from javascript console. It says
> > Error: Expected ':' but found ';'. Declaration dropped.
> > Source File: https://www.xxx.com/select2007_step1.asp
> > Line: 0
> >
> > Bu the first 10 line of code are:
> >
> > <%
> > pStr = "private, no-cache, must-revalidate"
> > Response.ExpiresAbsolute = #2000-01-01#
> > Response.AddHeader "pragma", "no-cache"
> > Response.AddHeader "cache-control", pStr
> > %>
> >
> >
> > Flexible Travel Insurance Quote
> >
> > It seems to me that it has nothing to do Javascript, it is asp.
>
> Why? What is making you say that? Why would an ASP vbscript error be
> raised in a Javascript console?
>
>
> > Can you shed a light on me?
> > After I remove this part:<%
> > pStr = "private, no-cache, must-revalidate"
> > Response.ExpiresAbsolute = #2000-01-01#
> > Response.AddHeader "pragma", "no-cache"
> > Response.AddHeader "cache-control", pStr
> > %>
> > It still give me the error message.
> >
> And if you remove every other bit of ASP code, I bet you will still get
> the error ... unless removing the ASP code causes you to inadvertantly
> fix or delete the javascript code that is causing the error.
>
> Your problem is in a line of code containing a colon, probably a var
> statement. The error it is causing is preventing the rest of the code in
> the page from executing leading to the confusion.
>
>
>
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>
Re: wierd error message in asp page
am 01.05.2007 04:26:37 von stcheng
Hi Betty,
If the error is raised from client-side javascript console, I think you
should check the rendered out HTML source through webbrowser's "View
Source" rather than server-side asp content. The line number should be
matching the content of the client-side rendered page source.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: wierd error message in asp page
am 25.05.2007 18:48:03 von bettys
Hi Steven,
You are absolutely right. I got it. Most of the time it seems it doesn't
give me any trouble.
Thank you.
--
Betty
"Steven Cheng[MSFT]" wrote:
> Hi Betty,
>
> If the error is raised from client-side javascript console, I think you
> should check the rendered out HTML source through webbrowser's "View
> Source" rather than server-side asp content. The line number should be
> matching the content of the client-side rendered page source.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
Re: wierd error message in asp page
am 25.05.2007 22:03:28 von Tim Slattery
c676228 wrote:
>Hi all,
>I have a page when run in browser(firefox), it has some error message from
>from javascript console. It says
>Error: Expected ':' but found ';'. Declaration dropped.
>Source File: https://www.xxx.com/select2007_step1.asp
>Line: 0
>
>Bu the first 10 line of code are:
>
><%
>pStr = "private, no-cache, must-revalidate"
>Response.ExpiresAbsolute = #2000-01-01#
>Response.AddHeader "pragma", "no-cache"
>Response.AddHeader "cache-control", pStr
>%>
>
>
>
>Flexible Travel Insurance Quote
>
>It seems to me that it has nothing to do Javascript, it is asp.
It's pointing to something in the HTML that it received, not the
original ASP file, which it knows nothing about. Use the "View Source"
option, and see what you can find in there.
Directing you to line 0 is no good, it kind of implies that it's very
confused.
--
Tim Slattery
MS MVP(DTS)
Slattery_T@bls.gov
http://members.cox.net/slatteryt