Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

JavaScript Tips: Parse QueryString to Dictionary

The URL Query String is something that is usually just sent to the server-side code and parse there for use in specifying the data to query. A somewhat little known feature of the JavaScript DOM is that the QueryString values are accessible from client-side javaScript code too. The following code can be used to read what the full QueryString value is from the current pages URL: var queryString = document.location.search; Although, the QueryString value can be accessed from JavaScript, it isn't p... [More]

JavaScript Basics: How to create a Dictionary with Key/Value pairs

In statically typed programming languages a Dictionary (Key/Value pair collection) object can be very useful at times. While JavaScript doesn't natively include a type called "Dictionary", it does contain a very flexible type called "Object". The JavaScript "Object" type is very versatile since JavaScript is a dynamically typed language. This flexibility allows for the "Object" type to be used in ways that might seem strange when compared to statically typed languages such as C#. Creating a Dict... [More]