background preloader

Ajax

Facebook Twitter

Looking for an extremely simple AJAX script.

Purchases

Easy Javascript/AJAX Exit Pop up script – Creates div overlay on page exit. – Works! Fixed Chrome Image Issue – It is now working in All Browsers So the other day a client requested that when a visitor leaves any page on the site, they be greeted by an alert (such as ‘alert(‘this is your alert’);’) and if they click ‘Cancel’ they then go to an alternate ‘Exit Pop’ page that acts as a page to salvage a sale, or an opt-in, or dignity, what have you. Otherwise they just click ‘OK’ and go on their merry way in the opposite direction. Usually I would just grab code from another page that I had done something similar on, but If you have ever dealt with old code before, You have either forgotten exactly what you needed to change in order for it to work ‘out of the box’ for your new situation, so you end up wasting about 10 minutes testing to get it right.

So I decided to streamline the process once and for all! I will try to explain my code. First, the page you want the action to happen on, in our case, is index.php.

Firefox

Delicious. Suggestion. From Ajax Patterns Evidence: 2/3 Tags: Auto-Complete Fill Intelligent Populate Predict Suggest Wizard Predictive diagram - Google Suggest-Like - Couple of letters in text box and a dropdown Doc is typing out an electronic prescription.

Suggestion

He intends to prescribe "Vancomycin 65mg", but as soon as he types in "V", the system has already detected a handful of likely choices, based on the patient's history and Doc's prescription style. How can you improve throughput? Free text remains the most powerful way for humans to communicate with computers. Suggest words or phrases which are likely to complete what the user's typing. Drupal + AJAX, Part 1. Some months ago, I discussed multiple values in CCK using AJAX.

Drupal + AJAX, Part 1

A few people showed interest, so here's Part 1 of how AJAX can go together with Drupal. We'll start with a common use case: checking that a username is available when a new user signs up. After you're done with this tutorial, you should be able to give the new user near-instant feedback on whether or not their username is available. I like to start at my desired result and work backwards, so that's what we'll do. Let's create a module called demo_user.module and begin! Step 1: Alter the user registration form to include a result field The desired result here is to show the user whether or not their desired username is available, so let's alter the registration form to give us a div to place our results in./** * Implemetation of hook_form_alter() */ function demo_user_form_alter($form_id, &$form) { if ($form_id == 'user_register') { $username_verify_result = ' Free AJAX animated loading gif's.

AJAX: How to Handle Bookmarks and Back Buttons. Published on ONJava.com ( See this if you're having trouble printing code examples by Brad Neuberg 10/26/2005 This article presents an open source JavaScript library that finally brings bookmarking and back button support to AJAX applications.

AJAX: How to Handle Bookmarks and Back Buttons

By the end of this tutorial, developers will have a solution to an AJAX problem that not even Google Maps or Gmail possesses: robust, usable bookmarking and back and forward behavior that works exactly like the rest of the Web. "AJAX: How to Handle Bookmarks and Back Buttons" explains the significant issues that AJAX applications currently face with bookmarks and the back button; presents the Really Simple History library, an open source framework that solves these problems; and provides several working examples. The principal discoveries of the framework presented in this article are twofold. The Problem Bookmarks and the back button work great for traditional, multi-page web applications.

The Solution Example Our simple example is now finished. Deep Linking for AJAX. I have just made a independent study on “deep linking for AJAX” for the course Web 2.0 technology.

Deep Linking for AJAX

Seems that most of the info on the web about deep linking implementation are for Flash web site but not AJAX’s, so I release my report and presentation slide here hoping can help somebody. Category Archive for ‘XMLHttpRequest’ at hacks.mozilla.org. Dynamic HTML and XML: The XMLHttpRequest Object. Ajax Patterns. AJAX and HTTPS - JavaScript / Ajax / DHTML answers. Troubles with Asynchronous Ajax Requests and PHP Sessions. As I sit here watching “The Muppets Take Manhattan” in Spanish in the middle of a Costa Rican thunderstorm, I find my mind drifting back to a recent project where I spent a day debugging a frustratingly annoying problem: A user would visit the web application I was working on, and after a given page was loaded, all of the session data associated with their visit would be suddenly gone.

Troubles with Asynchronous Ajax Requests and PHP Sessions

The user would no longer be logged into the site, and any changes they made (which were logged in session data) were lost. I spent tonnes of time in the debugger (while at times unreliable and frustrating on huge projects, the Zend debugger is still an invaluable aid for the PHP application developer) and kept seeing the same thing: the session data were simply being erased at some point, and the storage in the database would register ’’ as the data for the session. It was driving me crazy. I would sit there in the debugger and go through the same sequence each time: Debug the request for the page load. JavaScript Security. JavaScript Security(Page 1 of 9 ) Downloading and running programs written by unknown parties is a dangerous proposition.

JavaScript Security

A program available on the Web could work as advertised, but then again it could also install spyware, a backdoor into your system, or a virus, or exhibit even worse behavior such as stealing or deleting your data. The decision to take the risk of running executable programs is typically explicit; you have to download the program and assert your desire to run it by confirming a dialog box or double-clicking the program’s icon. Ajaxian. How to Develop Web Applications with Ajax, Pt. 1 - WebReference.com - By Jonathan Fenocchi In the past, web applications were limited because a web page had to be reloaded (or another page loaded in its place) in order for new data to be obtained.

How to Develop Web Applications with Ajax, Pt. 1 - WebReference.com -

Other methods were available (without loading another page), but the techniques weren’t well supported and had a tendency to be buggy.