Solved

Microsoft JScript runtime error: (...)' is null or not an object

Posted on 2010-09-07
1
434 Views
Last Modified: 2012-05-10
I get this error in a simple JS - that I'm using to set focus.  THe JS is a page that is hosted in a Masterpage... What is wrong?   Why can't it find this object ?

I look at the source and it's there...

   document.getElementById(<%= cmbPREFIX.ClientID %>).focus()





  function alertSaved() {
        var oWnd = radalert("Constituent Information Added!",300,100, "TRU");
        oWnd.add_close(function () {

// ERROR HERE
                     document.getElementById(<%= cmbPREFIX.ClientID %>).focus()
   

           /// Doesn't work either -   $get('cmbPREFIX').focus();
        });

   
0
Comment
Question by:JElster
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 125 total points
ID: 33618640
I think this is a simple case of missing apostrophes:


document.getElementById('<%= cmbPREFIX.ClientID %>').focus() ;

Open in new window

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

19 Experts available now in Live!

Get 1:1 Help Now