开发者

In IE8, why am I getting a javascript error on my DocType line

I am getting this error when running a webpage in internet explorer 8 (not sure if it matters but it happens when I load up a jquery ui dialog)

In IE8, why am I getting a javascript error on my DocType line

When I click yes, it brings up the IE8 javascript debugging tools but what is weird is that it shows the error being on the doctype line . .

In IE8, why am I getting a javascript error on my DocType line

Can anyone explain what IE is trying to tell me and how I can debug this??

Update:

in response to folks saying i need to remove the blank line at the top, here is my code. There is no extra blank line on anything in my site.master file so i don't understan开发者_运维问答d what it would take to remove this blank line that i see when i view source in IE8.

<%@ Import Namespace="DomainModel" %>
<%@ Import Namespace="Mvc.Views.OrganisationalUnit" %> 
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<Mvc.ViewModels.BaseViewModel>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">


Try removing the whitespace at the top of the file (i.e. line 1). If that doesn't help, try retyping the string manually to make sure no odd characters are hidden in there. Otherwise, the code looks valid to me.

Update:
Try removing the line breaks between your import statements like this:

<%@ Import Namespace="DomainModel" %><%@ Import Namespace="Mvc.Views.OrganisationalUnit" %><%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<Mvc.ViewModels.BaseViewModel>" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜