Javascript RSS
Follow The Programmer Blog RSS feed to stay up to date with the latest programming tutorials regarding anything Javascript. If you're looking to upgrade your software developer shirt collection we offer some pretty cool programmer shirts. For more of the latest developer news and programming tutorials visit The Programmer Blog. View all programming tutorials tagged with Javascript below:KnockoutJS - ko.toJSON copying unwanted properties
When using KnockoutJS and the Knockout Mapping Plugin, you may notice extra properties are being serialized with your viewmodels, ex. "__ko_mapping__" or "copiedProperties" objects. JSON Example: { "MyObject": { "Id": "00000000-0000-0000-0000-000000000000", "Type": 1, "Name": "Default MyObject" }, "__ko_mapping__": { "ignore": [], "include": ["_destroy"], "copy": [], "observe": [], "mappedProperties": { "MyObject.Id": true, "MyObject.Type": true, "MyObject.Name": true }, "copiedProperties": {}, "": {}...
JavaScript - Getting query string values
One of the key ingredients to an AJAX driven website is the ability to reliably get query string parameters. We will run through an example using the new URLSearchParams API and also a Javascript only implementation for legacy browsers. Using the URLSearchParams Web API Consider the url http://www.systemoutofmemory.com?id=1&firstName=Bob&hobby=Baseball&hobby=Basketball Get the query string params var queryParams = new URLSearchParams(window.location.search); Iterate &...