This is for backbone.js questions that specifically relate to Backbone's event handling system.
Questions tagged [backbone-events]
787 questions
-1
votes
2 answers
Binding events to views - Firing uneven number of times
I have UserModel: UserView and UserCollection: UserCollectionView. With this, I am trying to bind a click event to the UserView (I am doing this in UserView). So, this is the code I have:
var root = 'http://localhost:5000/api/v1';
var app = {};
//…

Kevin
- 6,539
- 5
- 44
- 54
-1
votes
1 answer
Backbone.js trigger event blocks the subsequent statement
obj1.listen(obj2, 'save', function(t) {
t.preventDefault()
})
obj2 = {
save: function save(a) {
var saveOrNot = !1;
this.trigger("save", {
preventDefault: function() {
saveOrNot = !0
}
});
…

Chales Tuang
- 11
- 2
-1
votes
2 answers
Dom elements not updated when accessed inside backbone afterRender()
Here is my render() function:
initialize: function() {
this.selectDivView = new SelectView({
url: '/ir/secure/api/v40/myvariants/myVariantDBs',
method: 'POST',
template: myVariantDBFilterTemplate
});
},
render:…

ashy143
- 169
- 11
-1
votes
1 answer
Duplicate Username should not be allowed
I have created UI for users to create their own username and password. Username and passwords are stored in JSON format.
Workflow:
When user clicks on Register Button, user will be presented with UI
screen with username and password input text…
-1
votes
1 answer
proxy is undefined error backboneJS
var my_variables = {};
_.extend(my_variables,Backbone.Events);
my_variables.on("event_name",function(msg)
{
alert("easy street"+msg);
});
proxy.on("all", function(eventName)
{
…

Gabriel ThaKid
- 857
- 3
- 9
- 19
-1
votes
1 answer
Is the event Hash in Backbone a form of pub-sub or is it another type of messaging mechanism?
The Event object is Backbone is clearly an implementation of pubSub ( http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern ) but is the events Hash also? The events will be published regardless of who is receiving the msg, but since it is…

R Claven
- 1,160
- 2
- 13
- 27
-4
votes
1 answer
Backbone event behavior
I'm just getting started with backbone, and I have run into a very confusing wall.
What I am doing:
Create a model instance of type A that calls fetch during initialization.
Create a model instance of type B that calls fetch during…

user3654762
- 41
- 5