Solved

Page Error: 'console' is undefined

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

Independent Software Vendors: 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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

623 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