Solved

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

Posted on 2010-09-07
1
436 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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 …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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