JavaScript function to the rescue! Jul08 '06

After all of my whining and griping (such a baby I am), I stumbled upon the JavaScript function encodeURI.

That’s it. It took care of all of my problems (for today).

Isn’t it funny how much mental anguish one goes through, when the answer is right in front of their faces?

Ah, the life of a developer.

(I need a drink.)

Categories: JavaScript

Add Feedback (view all)

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Actually, I think you might want encodeURIComponent() instead of encodeURI(), assuming that you’re calling it for each parameter value that y ... Read more.

Ooh tasty... Even better. I will try that, thanks. I am calling it for each, yes, so that should be better. ... Read more.

This blog saved my life. I was implementing an AJAX submit for my site, which involves a WYSIWYG editor. Needless to say, all those quotes, ampersa ... Read more.

Yea it really is a lifesaver. Imagine all the extra coding if that function didn't exist. Yuck. Escaping invalid characters is not ... Read more.

I too will thank you for this. Until now I have been using encodeURI() but I suddenly found my AJAX cutting a variable off when it had an a ... Read more.

I'm new to sending things via POST in ajax. And I am building a WYSIWIG type application. ajax is perfect for this type of application, but boy d ... Read more.

matthom is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.

Contact Matt

Similar Entries

Stats

26 unique visits since August 2008

Syndicate

Advertisements