dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Web
Expertise: Intermediate
Jan 5, 2002

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


An Improved escape() Function in Javascript


Currently Javascript's escape() has some limitations. For instance, if you want to pass a+b not a b, you want to get the literal "+" in the server side. Javascript's escape function does not replace the "+" with a hexadecimal value, so when it is received on the server, it will be treated as a blank space rather than as a "+." The function below will replace all special characters with hexadecimal format functions just like ASP's Server.URLEncode() function.
 
function urlencode(strValue) {
	var charValue,blnValidChar,charCodeValue;
	var strEncodedValue='';
	for(var i=0;i
Prasad Haridass
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date