473,387 Members | 1,766 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,387 software developers and data experts.

wierd error message in asp page

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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Flexible Travel Insurance Quote</title>

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
Apr 30 '07 #1
5 3131
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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/<title>Flexible Travel Insurance Quote</title>

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.
Apr 30 '07 #2
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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/<title>Flexible Travel Insurance Quote</title>

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.
Apr 30 '07 #3
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.

May 1 '07 #4
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.

May 25 '07 #5
c676228 <be****@community.nospamwrote:
>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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Flexible Travel Insurance Quote</title>

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)
Sl********@bls.gov
http://members.cox.net/slatteryt
May 25 '07 #6

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

Similar topics

9
by: John Pether (john | last post by:
have been working with a site and today started getting an error when uploaded page on the live server...everything works well locally... The XML page cannot be displayed Cannot view XML input...
3
by: vool | last post by:
Hi all, I've got a really wierd problem here. When I access a web page that adds information to a database on a PC running XP Pro it works as it should. When I access the same page from a...
3
by: Markus Fischer | last post by:
Hi, I'm experiencing a wierd problem with IE 6 in Windows with two _slightly_ different Version. Give the following HTMl-Code, ideally the output of offsetTop should be "105"; a few pixel...
1
by: VRWC | last post by:
Hi folks, Hope someone has some insight to this problem. I have a form that contains a large (5" x 4") text box bound to a memo field. This field allows users to type in the text of an email...
1
by: paul reed | last post by:
Hello, I am having some weird behavior between two machines...one which is running the 1.1 framework and one which is running 1.0. After opening a child form from a parent...I update the...
1
by: Dean | last post by:
PageOne.aspx has an image control. The imageURL of the image control points to ImagePump.aspx. ImagePump.aspx gets a bitmap out of a SQLServer database, puts in into a bitmap object and does a:...
7
by: Shane Bishop | last post by:
I've been fighting with the Page_Load event firing twice. I looked through this user group and saw several other people having similar problems. There were various reasons for it:...
3
by: VB Programmer | last post by:
When I run my asp.net app locally it runs perfectly. I upload it to another server it runs perfectly. I upload it to a 2nd server and the 1st page (Default.aspx) comes up fine. I then navigate...
4
by: Cirene | last post by:
In my web.config I added <pages enableSessionState="true">. In each of my pages I also added EnableSessionState="True" to the Page declaration. (I didn't think this was necessary, but...) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.