Solved

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

Posted on 2013-05-22
5
204 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 20

Accepted Solution

by:
Amitkumar Panchal earned 500 total points
Comment Utility
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
Comment Utility
Thanks I'll try and tell You.
0
 

Author Closing Comment

by:limmontreefree
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

771 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

16 Experts available now in Live!

Get 1:1 Help Now