Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8104009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:42:51+00:00 2026-06-05T23:42:51+00:00

I have getting a javascript error when attempting to reference an object in a

  • 0

I have getting a javascript error when attempting to reference an object in a ContentPlaceHolder that is outside the current ContentPlaceHolder (they are both on the same child page).

The error is: Microsoft JScript runtime error: Unable to set value of the property ‘value’: object is null or undefined

The script line where the error occurs is:

    <input type="submit" name="Master$cphMainContent$btnUnregister" value="Proceed" onclick="document.getElementById('Master_cphHeadContent_TimeAlert').value = GetSeconds(); return ValidateProvider(1);" id="cphMainContent_btnUnregister" class="netButton" />

The TimeAlert is a hidden object in the cphHeadContent ContentPlaceHodler.

Usually, I would know that the object (TimeAlert) is not visible when it is being called. However, this time it’s the same page, so I can’t figure out why the object is null or undefined.

Any suggestions how to resolve this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:42:53+00:00Added an answer on June 5, 2026 at 11:42 pm

    How are you setting the component ID on eventhandler?

    Look at eventhandler:

    document.getElementById(&#39;Master_cphHeadContent_TimeAlert&#39;).value = GetSeconds(); return ValidateProvider(1);
    

    Note &#39 is a HTML encoded char, here is proprably your problem. Try it:

    document.getElementById('Master_cphHeadContent_TimeAlert').value = GetSeconds(); return ValidateProvider(1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an aspx page that is getting an Object Expected javascript error on
I have a phonegap application that is throwing a javascript error. I have had
I am getting the following JavaScript error: 'value' is null or not an object
I'm getting a peculiar javascript error with IE. I have an updatepanel, and inside
The size of my JavaScript file is getting out of hand because I have
I have problems getting some of my views aligned in a relative layout that
I've taken a screenshot of the compiler inconsistencies that I have been getting when
I have some code that is failing due to an error: The name 'foo'
I am just getting started with HTML/JavaScript, and I have a simple question. I
We have a button that saves asynchronously using AjaxToolKit/C#/.NET. I'm getting this in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.