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 6232921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:12:15+00:00 2026-05-24T10:12:15+00:00

What I’ve got is an ASP.NET MasterPage/ContentPage, where the ContentPage utilizes an UpdatePanel with

  • 0

What I’ve got is an ASP.NET MasterPage/ContentPage, where the ContentPage utilizes an UpdatePanel with UpdateMode set to “Conditional”. This ContentPage is basically a MultiView that has 3 views: Setup, Confirm, and Complete. I’ve got navigation buttons that when clicked, go to the server, do what they need to do and finally update the UpdatePanel so it can come back. My problem lies in my JavaScript.

I have the following Global object literal named PAGE:

PAGE = {

    panel : undefined,
    currentView: undefined,

    buttons : {

        all : undefined,
        cont : undefined

    },

    views : {

        setup       : {},
        confirm     : {},
        complete    : {}

    }

};

My PAGE.init() function looks like this:

PAGE.init = function() { console.log("PAGE.init() fired");

    this.panel    = $('div[id$="Panel_Page"]');
    this.currentView  = this.panel.find('input[id$="Hidden_CurrentView"]').val();
    this.buttons.all  = this.panel.find('input[type="submit"]');
    this.buttons.cont = this.panel.find('input[id$="Button_Continue"]');

    this.buttons.all.click(function() { PAGE.panel.hide(); });

    switch (this.currentView) {

        case "confirm"      : this.views.confirm.init();    break;
        case "complete"     : this.views.complete.init();   break;
        default             : this.views.setup.init();      break;

    }

};

And last, but not least, it all gets kicked off by:

// Fire events on initial page load.
PAGE.init();

// Fire events for partial postbacks.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(PAGE.init);

My issue is that when it first fires Page.init() everything is great, however, when you click a button it immediately throws an error of: Uncaught TypeError: Cannot set property ‘all’ of undefined. Now I’ve tried to figure this out, but I’m at a loss. It seems as though this happens to ANY nested object literal off of the root of PAGE. The immediate properties like PAGE.panel work just fine, but as soon as you need access to PAGE.buttons.all or PAGE.views.setup, it throws this error. I have never seen this before.

Any ideas out there?

  • 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-05-24T10:12:15+00:00Added an answer on May 24, 2026 at 10:12 am

    Instead of using this inside of the PAGE.init() function, I used PAGE and that corrected the issue. Apparently this was not referring to PAGE but rather PAGE.init. Still not sure why, as I do this elsewhere and it works.

    For instance, the following use of this works and it’s no different than how I use it in my OP:

    PAGE.views.setup = {
    
        buttons : { 
    
            all : undefined,
            cont : undefined
    
        },
    
        init: function() {
    
            var self = this,
                buttons = self.buttons;
    
                buttons.all = PAGE.panel.find('input[type="submit"]');
    
            buttons.all.click(function() { alert(this.id + " clicked"); });
    
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.