Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Page Error: 'console' is undefined

Posted on 2013-05-18
5
Medium Priority
?
741 Views
Last Modified: 2013-10-07
I have constructed a very simple page index1.aspx with masterPage index1.master in Visual Studio 2008 with IIs express.
When displaying the page with internet explorer v8 I get the following errror:
No error is displayed using chrome browser.
Message: 'console' is undefined
Line: 200
Char: 3
Code: 0
URI: http://localhost:10225/sqlCams00DataCS/modules/create_cams_managers/index1.aspx
Thanks in advance for any help given.
For clarity I the full code is below:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="index1.master.cs" Inherits="modules_create_cams_managers_index1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class modules_create_cams_managers_index1 : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
<%@ Page Language="C#" MasterPageFile="~/modules/create_cams_managers/index1.master" AutoEventWireup="true" CodeFile="index1.aspx.cs" Inherits="modules_create_cams_managers_index1" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class modules_create_cams_managers_index1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}

Open in new window

0
Comment
Question by:homeshopper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Ersoy Hasan
ID: 39177042
You are using console.log() somewhere in the javascript .I guess it is added for debugging. Search them and delete them you don need it for production.
0
 

Author Comment

by:homeshopper
ID: 39177175
Thank you for yor comment.
I could not find a console.log or code reference to console.log()
The pages are very simple without any javascript.
However, on another site I found the following:
<script type="text/javascript">
    if(typeof console === "undefined") { var console = { log: function (logMsg) { } }; }
</script>
Adding this code between
<head runat="server">
<title>Untitled Page</title>
 </head>
Cured the problem.
I assume there is some common problem when using IE8.
0
 
LVL 4

Accepted Solution

by:
Ersoy Hasan earned 2000 total points
ID: 39180122
well that is not a problem console is something that belongs to debugging tools and it is not part of the browser. If you do not have javascript your page shouldn't fire javascript errors :). Look closely to your code. You can post the generated html from the browser if you'd like me to further investigate it :) .
0
 

Author Comment

by:homeshopper
ID: 39180218
Thanks, at this time I was only using html and using IeWebDeveloper V2 for ie8
to check page structure and tags etc. Later on in development will probably be using some java, but mostly C#.
0
 

Author Comment

by:homeshopper
ID: 39551623
I've requested that this question be closed as follows:

Accepted answer: 0 points for homeshopper's comment #a39180218

for the following reason:

I have now solved the problem
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question