Solved

Page Error: 'console' is undefined

Posted on 2013-05-18
5
685 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 500 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Content Page 3 64
asp.net figure out error 3 47
write html in textarea and record it into a database table 3 41
What is GIS method of Geometry data type? 6 33
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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