blog

Aug 29 2010

Use JavaScript encodeURIComponent function instead of escape for your Ajax application

by Anya Petersen

Passing variables from JavaScript to a server side language like PHP is a common task at the heart of many Ajax applications. Since the variable will be passed as either post data or a query string, it's important to encode the variable such that it can be decoded correctly...