Telerik blogs
  • Web

    Encode and Decode strings using JavaScript

    In order for a string to be read from all computers sometimes it is useful to encode and decode it. This can be easily achieved using the JavaScript built-in escape() and unescape() methods. Both the escape() and the unescape() methods have the same argument – the string which will be escaped or unescaped. The escape() method returns a string value (in Unicode format) that represents the encoded contents of the function argument. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as "%20". Additionally, having...
    May 27, 2021 2 min read
  • Web

    Encode and Decode URI(Uniform Resource Identifier) using JavaScript

    The current article is taken from https://developer.mozilla.org/ In some scenarios it is useful to encode and decode the URI. For example: To avoid unexpected requests to the server, you should call encodeURIComponent on any user-entered parameters that will be passed as part of a URI. For example, a user could type "Thyme &time=again" for a variable comment. Not using encodeURIComponent on this variable will give comment=Thyme%20&time=again. Note that the ampersand and the equal sign mark a new key and value pair. So instead of having a POST comment key equal to "Thyme &time=again", you have two POST keys, one equal to "Thyme " and another...
    May 27, 2021 2 min read
  • Release

    New support resources search facilities on telerik.com

    Greetings everyone, With the brand new look-and-feel of telerik.com we introduced for the landmark Q3 2008 release you probably noticed that the support resources searching capabilities have changed, too. Our aim was to expose intuitive and straight-forward means to browse the available resources based on their type and find the information/examples you need in a blink of an eye. In a nutshell, we would like each visitor to have the ability to search by product line and get a list of results with a leading indicator image designating the resource type (demo, help topic, knowledge base article, code library project, etc.). Since a...
    December 22, 2008 3 min read
  • Web

    How do I pause execution in JavaScript?

    The current article is taken from javascript.faqts Contributors: ha mo, Daniel LaLiberte, Brent Boyer, Martin Honnen, mercury rising,   There is no true wait, sleep, or similar function in either the core JavaScript language or in client side JavaScript. Client side JavaScript however provides     setTimeout('js code here', delayInMilliseconds) which allows you to schedule execution of piece of script and setInterval('js code here', intervalInMilliseconds) which allows you to periodically execute a piece of script. So if you wanted (pseudo code) statement1;  wait (someDelay);  statement2;  you would stuff the code into functions: function statement1 () {      // your code here  }  function statement2 () {      // your code here  }    and call statement1();  setTimeout('statement2()', someDelay);      If you wanted (pseudo...
    May 27, 2021 3 min read
  • Release

    A new series of blog posts coming up

    Hi all,   Telerik’s support is always focused at satisfying customer needs – if you have used our controls for some time now, I guess you have already found that out. If you have just started getting familiar with our products – give us a try ;)   Our support services however, being targeted on our products only, cannot provide you with custom solutions, although we try to help as much as possible. That is why we decided to start a new series of blog posts aimed at different aspects of ASP.NET development. The content is gathered from various newsgroups, blog posts, tutorials in...
    May 27, 2021 2 min read