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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:55:59+00:00 2026-05-29T05:55:59+00:00

So here is the thing. I’m making an app that uses backboneJS. I currently

  • 0

So here is the thing. I’m making an app that uses backboneJS. I currently create a list of different rows. Each row has an edit button with the function editRow and a delete button with the function removeRow. Currently editRow works and it creates the new view which in this case is a modalWindow and its app.EditRowView. This view has another button that I simply cannot bind to. The function that does not get bound is modalWindow.
Any clues? Is my logic wrong? Should views not create other views?
Any help is much appreciated as usual.

    app.FormRowView = Backbone.View.extend({
        tagName:'li',
        events: {
            "click .danger"         : "removeRow",
            "click .primary"        : "editRow"

        },

        initialize:function(){
            var template =this.model.get('temp');
            _.bindAll(this, 'render');
            this.model.bind('change', this.render);
            this.template = _.template($("#"+template).html());
        },

        render:function(){
            var renderedContent = this.template(this.model.toJSON());

            $(this.el).html(renderedContent);

            $(function() {
              $( ".sortable" ).sortable();
              $( ".sortable" ).disableSelection();
            });


            return this;

        },

        removeRow:function(){
            $(this.el).remove();
        },

        editRow:function(){
            var view = new app.EditRowView({
                model:this.model,
                collection: this.collection
            });
            $("body").append(view.render().el);
            return this;
        }

    });

    app.EditRowView = Backbone.View.extend({

        events: {
            "click .save"       : "modalWindow"
        },

        initialize:function(){

            var template =this.model.get('editScreenTemplate');
            _.bindAll(this, 'render');
            this.model.bind('change', this.render);
            this.template = _.template($("#"+template).html());
        },

        render:function(){
            var renderedContent = this.template(this.model.toJSON());
            $(this.el).html(renderedContent);
            return this;

        },

        modalWindow:function(){
            alert("im in");

        }
    });

Basically what is happening is that the function modalWindow never fires. I have the right element (a button with class .save) in the UI

  • 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-29T05:56:00+00:00Added an answer on May 29, 2026 at 5:56 am

    Hey guys so I fiugured it out. I need to specify a tagName in order for the delegate events to bind to that view…
    thanks any ways

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the thing. I currently have a tabBar controller, with several navigation controllers
i didn't really know how to title this question, but here's a thing that
Here's a coding problem for those that like this kind of thing. Let's see
yesHave a simple thing here, but not that handy in PHP. Basically I have
I am currently working on a Log in form but the thing here is
I'm using this: http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_toggle the thing here is that i change the button to
Here in Google App Engines I got this code that would help fetch an
I have this thing here var filelist = new List< KeyValuePair< string, string>>(); and
A bit of an odd thing here. Normally with any app, if open it
I'm not sure that I'm doing the right thing here... I'm writing a user

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.