background preloader

JavaScript

Facebook Twitter

AJAX et l'échange de données en JavaScript. JavaScript RegExp Example: Online Regular Expression Tester. Feel free to test JavaScript's RegExp support right here in your browser. Obviously, JavaScript (or Microsoft's variant JScript) will need to be enabled in your browser for this to work. Since this tester is implemented in JavaScript, it will reflect the features and limitations of your web browser's JavaScript implementation. If you're looking for a general-purpose regular expression tester supporting a variety of regex flavors, grab yourself a copy of RegexBuddy.

Detecting the File Download Dialog In the Browser. Updated 2011-01-28 to reference the correct question stackoverflow.com Updated 2011-10-02 With a link to a sample application on github. Updated 2013-07-01 with corrected jQuery Cookie plug-in link and syntax In the web application I work on we sometimes need to create PDF documents based on some user input. In most cases, these documents are fairly simple and quick to create, allowing us to create the documents in memory and then send them back to the requesting user with a “Content Disposition: attachment” in the HTTP response.

This causes the browser file download mechanism to kick in allowing the user to save or open the resulting PDF. Generating a file, however, can sometimes take a few seconds. There are some ways to work around this by writing the file to disk or some caching mechanism and then providing a separate URL endpoint to download the finished file, but these approaches require what is, in my opinion, a non-trivial amount of server side code to accomplish.

Share This Post:

Reseau sociaux

Librairies. Jquery. Ajax. How to check whether JavaScript is enabled in client browser using Java code. Javascript Function to Check or Uncheck all Checkboxes. This Javascript function will check or uncheck all the checkboxes in an HTML form. This function is specially designed for dynamic pages with varying numbers of checkboxes. Unlike other functions out there, it will work without error even if there are no checkboxes or there is only one checkbox. It is also significantly faster for long lists, because it saves the length of the checkbox in a variable, instead of recalculating it in the loop.

Finally, the function is granted to the public domain--use it as you wish. Instructions Provide the form name and the field name of the checkbox as the parameters to the function. JavaScript Source Code function SetAllCheckBoxes(FormName, FieldName, CheckValue) { if(! Example Use your browser's view source command to see how the buttons below work to select or unselect all the checkboxes. Created 2004-12-13, Last Modified 2011-07-24, © Shailesh N.