Here is a great infographic that is very useful when choosing an adequate JS framework for your projects: http://www.webdesigndegreecenter.org/choosing-javascript-framework/
Hi, my name is Jhon Jario Roa and this is my blog. Here you'll find a little bit of java, python, javascript, linux, birt, jasper, objective C, extJS and other stuff. You also are gonna find some solutions that worked for me.
Showing posts with label BackboneJS. Show all posts
Showing posts with label BackboneJS. Show all posts
Thursday, September 10, 2015
Friday, February 13, 2015
Backbone: handling templating by using HandlebarsJs
Here is the link for a very useful article about using Handlebars.js
http://www.9bitstudios.com/2013/05/using-templates-in-backbone-js/
http://www.9bitstudios.com/2013/05/using-templates-in-backbone-js/
Monday, September 9, 2013
backboneJs: "change:[attribute]" event is not firing
add default values to the model :
var testModel = Backbone.Model.extend({
defaults: {
"attribute": ""
}
});
var testModel = Backbone.Model.extend({
defaults: {
"attribute": ""
}
});
Wednesday, September 4, 2013
BackboneJS: silent model saving
Use:
model.save(null, { silent: true })
reference:
http://stackoverflow.com/questions/8681603/how-to-make-set-be-silent-after-saving-model-for-first-time
model.save(null, { silent: true })
reference:
http://stackoverflow.com/questions/8681603/how-to-make-set-be-silent-after-saving-model-for-first-time
Wednesday, August 28, 2013
Backbone: Request Method:OPTIONS Status Code:405 Method Not Allowed trying to do a POST request with collection.fetch
I had this code:
this.organizationServicesCollection.url = 'http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/'
var fetchParameters = {
data: JSON.stringify({
parameters: {'key':'value'}
}),
type: 'POST',
contentType: 'application/json'
};
this.organizationServicesCollection.fetch(fetchParameters);
when executed I was having two resulting requests:
Request URL:http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/
Request Method:OPTIONS
Request URL:http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/
Request Method:POST
The problem was that my current proyect was being run in http://localhost:49998/ instead http://localhost/ so there was a cross domain issue. I fixed it running my project in http://localhost/ , now when running the code I had my single POST request:
Request URL:http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/
Request Method:POST
this.organizationServicesCollection.url = 'http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/'
var fetchParameters = {
data: JSON.stringify({
parameters: {'key':'value'}
}),
type: 'POST',
contentType: 'application/json'
};
this.organizationServicesCollection.fetch(fetchParameters);
when executed I was having two resulting requests:
Request URL:http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/
Request Method:OPTIONS
Request URL:http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/
Request Method:POST
The problem was that my current proyect was being run in http://localhost:49998/ instead http://localhost/ so there was a cross domain issue. I fixed it running my project in http://localhost/ , now when running the code I had my single POST request:
Request URL:http://localhost/SkyDesk.Services/SrvService.svc/rest/service/queryservices/
Request Method:POST
Tuesday, July 23, 2013
BackboneJS: click event is being triggered twice
In the view definition I had:
...
...
// events
,events: {
'click ': 'selectServiceEvent',
'click a': 'learnMoreLinkEvent'
}
...
...
,selectServiceEvent: function () {
this.clickCard();
}
But when I was clicking the div generated by de view, the selectServiceEvent function was being triggered twice. The solution was add return false; to the selectServiceEvent function:
,selectServiceEvent: function () {
this.clickCard();
return false;
}
...
...
// events
,events: {
'click ': 'selectServiceEvent',
'click a': 'learnMoreLinkEvent'
}
...
...
,selectServiceEvent: function () {
this.clickCard();
}
But when I was clicking the div generated by de view, the selectServiceEvent function was being triggered twice. The solution was add return false; to the selectServiceEvent function:
,selectServiceEvent: function () {
this.clickCard();
return false;
}
Friday, April 5, 2013
Great Backbone Tutorial
Here are the links of a great backbone tutorial.
Part 1: http://codebyexample.info/2012/03/06/backbone-baby-steps/
Part 2: http://codebyexample.info/2012/04/05/backbone-in-baby-steps-part-2/
Part 2.5: http://codebyexample.info/2012/04/29/backbone-in-baby-steps-part-2-5/
Part 3: http://codebyexample.info/2012/04/30/backbone-in-baby-steps-part-3/
Part 1: http://codebyexample.info/2012/03/06/backbone-baby-steps/
Part 2: http://codebyexample.info/2012/04/05/backbone-in-baby-steps-part-2/
Part 2.5: http://codebyexample.info/2012/04/29/backbone-in-baby-steps-part-2-5/
Part 3: http://codebyexample.info/2012/04/30/backbone-in-baby-steps-part-3/
Subscribe to:
Posts (Atom)