On 09.30.09, In snippets, by digitalbart
Using jQuery and ajax can be tricky if you need to get urls with parameter in them. You need to be smart when you pass a url so make sure to encode the url.
Using jQuery and ajax can be tricky if you need to get urls with parameter in them. You need to be smart when you pass a url so make sure to encode the url.
Luckily there is a function / jQuery plugin to encode url’s and decode them if you like. Download the urlencoder plugin and then use it as shown below.
1st step encode your url:
$("#con").html(
$.URLEncode("This is only a test");
);
2nd step decode your url:
$("#un").html(
$.URLDecode("This%20is%20only%20a%20test");
);
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.





Leave Your Response