?
Solved

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

Posted on 2010-09-07
1
Medium Priority
?
441 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
[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
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 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

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

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