Solved

errors when I run In my PC but not in the server

Posted on 2013-05-22
5
212 Views
Last Modified: 2013-05-28
Hello I have a web site that when I run inmy pc with visual studio 2010 I get a warning:

"Runtime Error in Microsoft JScript: Can not set value of the property 'className': object is null or undefined"

the code is

           var menuSelected = 5;
               items[menuSelected].className = "selected";

but If I push "continue" the proyect runs fine. And when I upload to the server All works fine.

My problem is that is very disturbing to see this message constantly and have to click to continue
0
Comment
Question by:limmontreefree
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 500 total points
ID: 39195078
such errors occur when a java script code is executed on a object which not loaded or initialized. in other words, javascript is started executing before loading the entire webpage.

please check at your end. To check, you can add a timer in the function, so that it can function will execute after some time. generally, javascript function calls are written at the end of web page to avoid such issue.
0
 

Author Comment

by:limmontreefree
ID: 39200420
Thanks I'll try and tell You.
0
 

Author Closing Comment

by:limmontreefree
ID: 39202740
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

861 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now