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. jQuery Animations: A 7-Step Program A dash of animation can spruce up a dull interface. In this tutorial, you'll learn how to do it the right way with jQuery. A Word From the Author Animation: a concept which often evokes divisive reactions from people. Some swear by its usefulness, whilst others rage at its overuse. Interested? Step 1: jQuery Basics jQuery is a JavaScript library which intends to make it easier for you, a developer, to construct better, feature rich, interactive web sites and user interfaces with as few lines of code as possible. A typical line of code looks like so: Let's take a look at each part: $ - Shorthand for the jquery object. Here, we are going to just stick with animation and effects related functionality. Step 2: Using the Baked-in Effects jQuery provides a ton of built in methods you can use right out of the box. Before we take a look at each of these methods, here is the general format for calling each method: speed denotes the duration, in seconds, of the animation. Step 4: Tweaking the Effect
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. 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. The Client Side Setup The code I’m showing here is adapted from an ASP .NET Web Forms application, but I’ll try to keep it as a generic looking as possible as this approach should work regardless of the platform you use. Notice the ‘hidden’ input field I included in that form. First, we’re using jQuery to hook into the ‘submit’ event of the HTML form.
20 Must Read JQuery Tutorials for Web Developers JQuery is a very powerful tool for web developers to create extra ordinary effects. If you are looking a JQuery tutorials then your search ends here. In this post I am sharing a list of very useful JQuery Tutorials to help web developers. In this list includes Form Validation, Form Submission without refreshing a page, Jquery Accordion Menu, Modal Window Tutorial, Vertical Scrolling menu with CSS and JQuery, Building Lightbox with JQuery and ASP.NET User Controls and jQuery etc. Here's the following JQuery Tutorials list: Simple JQuery Image Slide Show with Semi-Transparent Caption I will show you how to create a simple image slide show with a semi-transparent caption with jQuery. Inline Image Enlargement with jQuery So, having the day off, I decided to mess around a little with image manipulation. State-Saving jQuery Accordion Menu Without Reloading the Page After finding jQuery, I fell in love with it's ease of use and relatively small code footprint. Improving Search Boxes with jQuery
How to check whether JavaScript is enabled in client browser using Java code 30 Pro jQuery Tips, Tricks and Strategies Whether you’re a developer or a designer, a strong jQuery skillset is something you can’t afford to be without. Today, I’m going to show you 30 handy jQuery coding tricks that will help you make your scripts more robust, elegant and professional. Getting Started These tips and tricks all have one thing in common- they are all smashingly useful. We’ll start with some basic tricks, and move to some more advanced stuff like actually extending jQuery’s methods and filters. #1 – Delay with Animate() This is a very quick, easy way to cause delayed actions in jQuery without using setTimeout. For instance, let’s say that you wanted to open a dialog and then fade it away after 5 seconds. Don’t you just love jQuery chaining? UPDATE: jQuery 1.4 has eliminated the need for this hack with a method called delay(). #2 – Loop through Elements Backwards One of my personal favorites is being able to loop backwards through a set of elements. #3 – Is There Anything in the jQuery Object? Voila! Wrapping Up
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. 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.
Improve Ajax development with jQuery It's no surprise that Ajax is a great way to enhance a web application. However, sometimes the code you need to write can take more time than traditional development techniques, especially when you're interacting with dynamic server-side data sets. Luckily, with the introduction of jQuery, there's now a quicker and more robust way to write JavaScript and Ajax code. The suite of Ajax functions available through jQuery makes Ajax development much easier than in the past by letting you write less code and by lending additional methods and event handlers to cover most situations. The amount of code you need to write with jQuery is minimal, even when developing complex functions, so development is a lot faster. If you're not familiar with jQuery, it's essentially a JavaScript library that makes JavaScript development easier. Traditional JavaScript versus jQuery Ajax In the past, Ajax required a lot of redundant JavaScript code to form a request and handle the response. Listing 1. Listing 2.
Essential Tips and Tricks for Coding and Debugging AJAX Based Website Introduction AJAX is a wonderful piece of technique that has changed the way website response to user input. I like AJAX a lot, I discovered the goodness of AJAX 2 years ago, but the development was quite hard without jQuery framework. As a result, I didn't really keen to use it back then. Now, I'm with jQuery, and jQuery has made it's so much easier to integrate AJAX into a website. I assume you all have experiences with AJAX. A little bit of AJAX AJAX is abbrieviated from Asynchrounous javascript and XML. Typically, xhtml and css present the information to user and javascript is used to handle user interactions, and a server side language is to perform users' requests and might return result back to the user. Reduce connections and bandwidth to the server, images, scripts, stylesheets only need to be downloaded once Reduce loading times. Increase responsiveness and end user experiences. Always provide feedback to user. Prepare a plan to those users without Javascript support. echo $name ;
10 Super jQuery and Ajax Scripts for Web Developers In web development scripts like jQuery and Ajax becomes very handy for web developers. If you are a learner or a expert these scripts is really helpful of all. In this post I have shared free jQuery and Ajax scripts to help our upcoming web developers. In this list includes - A Drop-Down Menu Plugin for jQuery, Rotating jQuery Tabs, Sliding Login Panel with jQuery, AJAX Loading Panel, Mysql Ajax Table Editor, jQuery youtube playlist plugin etc. Nice & Clean Sliding Login Panel built with jQuery Please note the Login and Register forms in this demo will not work "out of the box" without a user login system pre-installed on your site (e.g. Download | Demo Uploadify is a jQuery plugin that allows the easy integration of a multiple (or single) file uploads on your website. Uploadify is available under the GPL and MIT licenses. Download | Demo Mysql Ajax Table Editor Mysql Ajax Table Editor is a php script that will allow you to create web pages to edit mysql tables in a matter of minutes.