We help IT Professionals succeed at work.
Get Started

ASP-Microsoft JScript runtime error: Object expected.

arvee2003
arvee2003 asked
on
790 Views
Last Modified: 2012-06-27
Hi,

Using vs2008 and c#.

In my development enironment I have 2 website with identical folder structure. And my master pages for
both website are almost similar.

In both the application I have some javascript referenced for counting the number of characters entered as follows:

 <script type="text/javascript" src='<%# Page.ResolveUrl("~/Javascript/textcounter.js") %>'> </script>

It works perfectly fine in one website. However in the other website onkeypress it was trying the javascript function
and it gives the following error.
      Microsoft JScript runtime error: Object expected

I am not sure why it is working on one website and not on the other.

Both VS2008 and the 2 website are all on the same machines.

Looks like it is something specific to a website.

This happens when debugging application using IE. When I ran in Chrome it is not displaying the error.

Is there any issues in webconfig files? All my reference are ok.

It is was working ok 2 days ago and I did not install anything.

Any input is appreciated.

Sure
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE