I have same error in MVC4 with EF5. I have updated from JQuery 1.7.1 to to JQuery 1.8.2 through the package manager.
Unhandled exception at line 2530, column 4 in ...jquery-1.8.2.js 0x80020003 - JavaScript runtime error: Member not found.
It is at:
// Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && ( fixSpecified[ name ] ? ret.value
!== "" : ret.specified ) ? ret.value : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name
); elem.setAttributeNode( ret ); } return ( ret.value = value + "" ); } };
And pops up for next class (code-first) on create:
[Table("Person")] public class Person { [Key] public int PersonId { get; set; } public string Name { get; set; } public DateTime CreateDate { get; set; } public DateTime LastModifiedDate { get; set; }
public DateTime? DeletedDate { get; set; } public Gender Gender { get; set; }
I create an MVC4 Internet Application. When I navigate to the login screen, the following error appear:
Unhandled exception at line 2699, column 4 in http://localhost:60987/Scripts/jquery-1.7.1.js
0x80020003 - JavaScript runtime error: Member not found.
(I've tried in another project with later version). Here is where it failes in jquery source:
// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
nodeHook = jQuery.valHooks.button = {
get: function( elem, name ) {
var ret;
ret = elem.getAttributeNode( name );
return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
ret.nodeValue :
undefined;
},
set: function( elem, value, name ) {
// Set the existing or create a new attribute node
var ret = elem.getAttributeNode( name );
if ( !ret ) {
ret = document.createAttribute( name );
elem.setAttributeNode( ret );
}
return ( ret.nodeValue = value + "" ); <------ HERE IS EXCEPTION THROWN
}
};
Further up in the call stack:
// Handle when the DOM is ready
ready: function( wait ) {
// Either a released hold or an DOMready/load event and not yet ready
if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
This only appears in I.E, and just recently. Could it be an update to I.E. that is causing the problem?
If I run the project in VS By pressing Ctrl + F5 the problem is still there and the browser throws the exception. However, if I publish the solution to Azure and use the same browser the problem is gone.
yes, i also found that the error occur because the javascript is run in a localhost environment when using debug from vs 2012, my work arround is to set the project folder as a website physical path in IIS, and visit the website by
http://127.0.01, and debug it by attaching the w3wp process.
I guess if we change the javascript execution security settings in IE options can solve the problem, but i don't like it. :)
Dinzi
0 Points
3 Posts
jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 22, 2012 04:22 AM|LINK
dear all, I followed the asp.net mvc tutorial, and when i open the creat view, it results a error at this line of js code:
return ( ret.nodeValue = value + "" );
the error message is:
Unhandled exception at line 2699, column 4 in http://localhost:41823/Scripts/jquery-1.7.1.js
0x80020003 - JavaScript runtime error: Member not found.
does anyone encountered the same error and know why?
bweber89
Member
486 Points
119 Posts
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 22, 2012 08:21 AM|LINK
Hi Dinzi
Try using a cdn link for example:
Does the same problem appear?
If so, please post us your create view and maybe the associated controller code as well.
Cheers
Junior Software Developer
Dinzi
0 Points
3 Posts
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 22, 2012 09:14 AM|LINK
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Create - 东方网内容管理系统</title> <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> <link href="/Content/site.css" rel="stylesheet"/> <script src="/Scripts/modernizr-2.6.2.js"></script> </head> <body> <header> <div class="content-wrapper"> <div class="float-left"> <p class="site-title"><a href="/">东方网内容管理系统</a>.Create</p> </div> <div class="float-right"> <nav> <ul id="menu"> <li><a href="/">Home</a></li> <li><a href="/PushChannels">Channels</a></li> </ul> </nav> </div> </div> </header> <div id="body"> <section class="content-wrapper main-content clear-fix"> <h2>Create</h2> <form action="/PushChannels/Create" method="post"> <fieldset> <legend>PushChannel</legend> <div class="editor-label"> <label for="ApplicationID">ApplicationID</label> </div> <div class="editor-field"> <input class="text-box single-line" id="ApplicationID" name="ApplicationID" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="ApplicationID" data-valmsg-replace="true"></span> </div> <div class="editor-label"> <label for="UserID">UserID</label> </div> <div class="editor-field"> <input class="text-box single-line" id="UserID" name="UserID" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="UserID" data-valmsg-replace="true"></span> </div> <div class="editor-label"> <label for="Uri">Uri</label> </div> <div class="editor-field"> <input class="text-box single-line" id="Uri" name="Uri" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="Uri" data-valmsg-replace="true"></span> </div> <div class="editor-label"> <label for="AccessToken">AccessToken</label> </div> <div class="editor-field"> <input class="text-box single-line" id="AccessToken" name="AccessToken" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="AccessToken" data-valmsg-replace="true"></span> </div> <div class="editor-label"> <label for="LastConnectionTime">LastConnectionTime</label> </div> <div class="editor-field"> <input class="text-box single-line" data-val="true" data-val-date="The field LastConnectionTime must be a date." data-val-required="The LastConnectionTime field is required." id="LastConnectionTime" name="LastConnectionTime" type="datetime" value="" /> <span class="field-validation-valid" data-valmsg-for="LastConnectionTime" data-valmsg-replace="true"></span> </div> <p> <input type="submit" value="Create" /> </p> </fieldset> </form> <div> <a href="/PushChannels">Back to List</a> </div> </section> </div> <footer> <div class="content-wrapper"> <div class="float-left"> <p>© 2012 - 东方网内容管理系统</p> </div> </div> </footer> <script src="/Scripts/jquery-1.8.2.js"></script> <script src="/Scripts/jquery.unobtrusive-ajax.js"></script> <script src="/Scripts/jquery.validate.js"></script> <script src="/Scripts/jquery.validate.unobtrusive.js"></script> </body> </html>thank you, could you help me find the problem? i just followed the tutorial, add nothing myself.
Jelleo
Member
12 Points
8 Posts
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 22, 2012 10:02 AM|LINK
Hi,
I have same error in MVC4 with EF5. I have updated from JQuery 1.7.1 to to JQuery 1.8.2 through the package manager.
Unhandled exception at line 2530, column 4 in ...jquery-1.8.2.js 0x80020003 - JavaScript runtime error: Member not found.
It is at:
// Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? ret.value : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return ( ret.value = value + "" ); } };
And pops up for next class (code-first) on create:
[Table("Person")] public class Person { [Key] public int PersonId { get; set; } public string Name { get; set; } public DateTime CreateDate { get; set; } public DateTime LastModifiedDate { get; set; } public DateTime? DeletedDate { get; set; } public Gender Gender { get; set; }
public Person() { this.CreateDate = DateTime.Now; this.LastModifiedDate = DateTime.Now; Gender = Models.Gender.Unknown; } } public enum Gender { Male, Female, Unknown = -99 };
luiscal
Member
2 Points
1 Post
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 23, 2012 06:19 AM|LINK
Same problem
The database is created, but IE9 crashes. However if I use FireFox, then no problem.
Any help will be very helpful and appreciated.
Only hapen with Windows 8, no with 7 or Windows Server R2
Thanks
ekenman
Member
36 Points
22 Posts
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 24, 2012 04:02 AM|LINK
I have the same problem.
VS 2012 on Windows 8 64 bit.
I create an MVC4 Internet Application. When I navigate to the login screen, the following error appear:
Unhandled exception at line 2699, column 4 in http://localhost:60987/Scripts/jquery-1.7.1.js
0x80020003 - JavaScript runtime error: Member not found.
(I've tried in another project with later version). Here is where it failes in jquery source:
// Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? ret.nodeValue : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return ( ret.nodeValue = value + "" ); <------ HERE IS EXCEPTION THROWN } };Further up in the call stack:
// Handle when the DOM is ready ready: function( wait ) { // Either a released hold or an DOMready/load event and not yet ready if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).This only appears in I.E, and just recently. Could it be an update to I.E. that is causing the problem?
Hopas this info helps you solve this issue.
ekenman
Member
36 Points
22 Posts
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Oct 24, 2012 04:26 AM|LINK
If I run the project in VS By pressing Ctrl + F5 the problem is still there and the browser throws the exception. However, if I publish the solution to Azure and use the same browser the problem is gone.
WinsonKwok
Member
2 Points
1 Post
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Nov 09, 2012 12:26 PM|LINK
I also got the same error when clicking the create new button to create new movie!
I found out that it is because additional scripts.render code located at the bottom of the create.cshtml file.
Since I have included the scripts.render code in _layout.cshtml file, so I delete the scripts.render code at the bottom
of the create.cshtml file and everything works fine!
Dinzi
0 Points
3 Posts
Re: jquery error in the mvc tutorial(vs.net 2012 MVC4)
Nov 09, 2012 10:38 PM|LINK
yes, i also found that the error occur because the javascript is run in a localhost environment when using debug from vs 2012, my work arround is to set the project folder as a website physical path in IIS, and visit the website by http://127.0.01, and debug it by attaching the w3wp process.
I guess if we change the javascript execution security settings in IE options can solve the problem, but i don't like it. :)