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

  • SEARCH
  • Home
  • 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 768437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:10:52+00:00 2026-05-14T18:10:52+00:00

Here is the code I am working with: $(document).ready(function () { var TemplateEditor =

  • 0

Here is the code I am working with:

$(document).ready(function () {

    var TemplateEditor = function () {

        var GroupClassName = 'group';
        var SelectedGroup = 0;

        var BindClicks = function () {
            $('.CriteriaSelections').unbind('click').click(function (event) {
                event.preventDefault();
                if (fnIsTheClickedBoxaGroup($(this))) {
                    TemplateEditor.GroupClicked();
                }
                else {
                    TemplateEditor.CriteriaClicked($(this), SelectedGroup);
                }
            });

            $('.groupselected').unbind('click').click(function (event) {
                event.preventDefault();
                SelectedGroup = $(this).attr('group-'.length);
                TemplateEditor.SelectGroup(SelectedGroup);
            });
        }


        var fnGetGroupID = function (Obj) {
            if (fnIsTheClickedBoxaGroup(Obj) == true) {
                return null;
            }
            else {
                //Get parent which is the group
                var ObjParent = Obj.parent();
                var GID = ObjParent.attr('id').substr('group-'.length);
                return GID;
            }
        }

        var fnIsTheClickedBoxaGroup = function (Obj) {
            var GetClass = Obj.attr('class');
            if (GetClass == GroupClassName) {
                return true;
            }
            else {
                return false;
            }
        }

        return {
            Init: function () {
                BindClicks();
            },
            CriteriaClicked: function (Obj, GroupID) {
                $('<div>').attr({ id: '' }).addClass('selection').text(Obj).appendTo('#group-' + GroupID);
            },
            GroupClicked: function () {

            },
            SelectGroupClicked: function () {

            },
            UpdateTargetPanel: function () {

            }
        };
    } ();
    TemplateEditor.Init();
});

I am trying to access this variable:
GroupClassName

This variable is inside this function

var fnIsTheClickedBoxaGroup = function (Obj) {
                var GetClass = Obj.attr('class');
                if (GetClass == GroupClassName) {
                    return true;
                }
                else {
                    return false;
                }
            }

When I run the program it says GroupClassName is undefined. Am I missing something here?

  • 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-14T18:10:53+00:00Added an answer on May 14, 2026 at 6:10 pm
    $(document).ready(function () {
    
        var TemplateEditor = (function () {
    
            var __self = this;
    
            __self.groupClassName = 'group',
            __self.selectedGroup = 0;
    
            __self.BindClicks = function () {
    
                $('.CriteriaSelections').unbind('click').click(function (event) {
                    event.preventDefault();
                    if (__self.fnIsTheClickedBoxaGroup($(this))) {
                        TemplateEditor.GroupClicked();
                    }
                    else {
                        TemplateEditor.CriteriaClicked($(this), __self.selectedGroup);
                    }
                });
    
                $('.groupselected').unbind('click').click(function (event) {
                    event.preventDefault();
                    __self.selectedGroup = $(this).attr('group-'.length);
                    TemplateEditor.SelectGroup(__self.selectedGroup);
                });
            }
    
    
            __self.fnGetGroupID = function (Obj) {
                if (__self.fnIsTheClickedBoxaGroup(Obj) == true) {
                    return null;
                }
                else {
                    //Get parent which is the group
                    var ObjParent = Obj.parent();
                    var GID = ObjParent.attr('id').substr('group-'.length);
                    return GID;
                }
            }
    
            __self.fnIsTheClickedBoxaGroup = function (Obj) {
                var GetClass = Obj.attr('class');
                if (GetClass == __self.groupClassName) {
                    return true;
                }
                else {
                    return false;
                }
            }
    
            return {
                Init: function () {
                    __self.BindClicks();
                },
                CriteriaClicked: function (Obj, GroupID) {
                    $('<div>').attr({ id: '' }).addClass('selection').text(Obj);
                    // text return text, don't jQuery object
                    $('<div>').appendTo('#group-' + GroupID);
                },
                GroupClicked: function () {
    
                },
                SelectGroupClicked: function () {
    
                },
                UpdateTargetPanel: function () {
    
                }
            };
    
        }).call({});
    
        TemplateEditor.Init();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 542k
  • Answers 542k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try this instead: self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"evt_det_bg.png"]]; May 17, 2026 at 6:14 am
  • Editorial Team
    Editorial Team added an answer Try (re)installing the 'builder' gem, that fixed the '1 for… May 17, 2026 at 6:14 am
  • Editorial Team
    Editorial Team added an answer $("td div").live("mouseover", function() { //mouseover code here }); I suggest… May 17, 2026 at 6:14 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have this code here: var infiltrationResult; while(thisOption) { var trNode = document.createElement('tr'); var
Here's the XML code I'm working with: <inventory> <drink> <lemonade supplier=mother id=1> <price>$2.50</price> <amount>20</amount>
I am working on code generation and ran into a snag with generics. Here
Im using this script for form titles: $(document).ready(function(){ $('.add-news').each( function () { $(this).val($(this).attr('defaultValue')); $(this).css({'color':'#686868'
Edit: The code here still has some bugs in it, and it could do
See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
We have some old C code here that's built with nmake. Is there an
I am using pseudo-code here, but this is in JavaScript. With the most efficient
I have a piece of code here that i really could use some help
I've got this code here: SqlCommand CodeStatus = new SqlCommand(SQL, DB); DB.Open(); Reader =

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.