Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-05-22
5
Medium Priority
?
234 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
[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
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
Amitkumar Panchal earned 2000 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

Technology Partners: 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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

636 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