website metrics

Ajax Lines

www.ajaxlines.com is a pretty extensive list of AJAX resources, tutorials, toolkits and websites.

List of all useful and interested resources that may help for AJAX development.

Collection of the tutorials that found around the internet for creating cool websites.

Compilation of toolkits/frameworks that will help in the process of rapid web development.

List of most popular websites which offers many AJAX.

0 Comments : 09.4.07

Ajax Video Tutorials

It’s very interesting to learn any new language from a video, here in this article I’ve collected many ajax tutorials from youtube.com and video.google.com, enjoy :)
Tutorials are covering ruby on rails, Script#, Jquery,.. and more

Script# is a C# compiler and set of frameworks that makes it possible to write Javascript and Ajax applications in C#, enabling you to benefit from compile-time type checking, error reporting, intellisense, refactoring, class browsing, doc-comments etc.

Ruby on Rails web application framework, Ajax on Rail is the support of ajax in Ruby on Rail framework

AJAX in Ruby on Rails tutorial

Components in Ruby on Rails

 Ruby on Rails demo

JQuery

Script#

0 Comments : 09.4.07

Web 2.0 Directory form Ajax Projects

Ajax Projects has just launched a new web 2.0 directory, this directory includes most of the web 2.0 sites, services and applications.
Categorized by service, it now includes the following categories ( Chat, Emails, Bookmarking, Games, Wikis, Travel, Video, Music, Programming, Office, Blogs, Calls & VOIP, RSS)

Visit it now http://web2.ajaxprojects.com

0 Comments : 09.4.07

RSS Ticker with AJAX

Description: RSS is a popular format for syndicating and displaying external content on your site, such as the latest headlines from CNN. Well, with this powerful RSS ticker script, you can now easily display any RSS content on your site in a ticker fashion! This script uses a simple PHP based RSS parser called LastRSS for retrieving a RSS feed, then Ajax and DHTML to display the feed dynamically and with flare. As a pre-requisite then, your site itself must support PHP, though the page using this ticker can be any regular HTML file.

Requirement of this script: Ability to run PHP on your site. Note that page(s) displaying the ticker and the backend PHP script must be on the same domain due to Ajax limitations.

Here are some features of Advanced RSS Ticker (Ajax invocation):

  • Displays any RSS feed on the web in a ticker fashion. Specify exactly what components of the feed items to display, such as the title of the item, description, or post date.
  • Each RSS feed is cached on the server for best performance. LastRSS feature.
  • Total customization of each RSS ticker through the frontend JavaScript- easily specify the RSS cache period, CSS class name to style the ticker, delay between message change, and what parts of the feed to show (ie: title+description).
  • Enable or disable a fading effect between message change just by adding or removing two lines of CSS code!
  • Ticker pauses onMouseover.
  • Display multiple RSS tickers on a page, each with their own independent settings.

A demo trumps any explanation, so here it is:

Demos:

Download the demo

Each ticker is called independently on the page, using the core function:

<script type="text/javascript">
//rssticker_ajax(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
new rssticker_ajax("BBC", 1200, "ddbox", "bbcclass", 3500, "date+description")
</script>

Detailed info below.


Directions: The easiest way to install Advanced Ajax ticker is to download the zip file below:

-rsstickerajax.zip

which contains all the files that make up the script. They are:

  • demo.htm: working demo on Advanced RSS ticker
  • rssticker.js: RSS ticker JavaScript library
  • lastrss/bridge.php: PHP script to output RSS feed in XML format, and communicate with our JavaScript via Ajax
  • lastrss/lastRSS.php: lastRSS.php class, unmodified.

1) For demo.htm:

Open up “demo.htm”, and copy the code found inside into the page(s) you wish the ticker to be displayed in. Make sure the code:

<script src=”rssticker.js” type=”text/javascript”>
//credit notice here
</script>

inside the HEAD section correctly references the location of “rssticker.js” on your server, if it’s been moved to a different directory. The code inside the BODY section shows how to invoke an RSS ticker instance:

<script type=”text/javascript”>
//rssticker_ajax(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
//1) RSS_id: “Array key of RSS feed in PHP script”
//2) cachetime: Time to cache the feed in seconds (0 for no cache)
//3) divId: “ID of DIV to display ticker in. DIV dynamically created”
//4) divClass: “Class name of this ticker, for styling purposes”
//5) delay: delay between message change, in milliseconds
//6) optionalswitch: “string” to control which parts of an item to display: “date” or “date+description”

new rssticker_ajax(”BBC”, 600, “ddbox”, “bbcclass”, 3500, “date+description”)

</script>

2) For rssticker.js:

Open up “rssticker.js”, and at the top, simply make sure the path to “bridge.php” on your server is correct:

//Relative URL:
var lastrssbridgeurl="lastrss/bridge.php"
//Absolute URL (uncomment below)
//var lastrssbridgeurl="http://"+window.location.hostname+"/lastrss/bridge.php"

If you wish to use an absolute reference to “bridge.php”, simply uncomment the last line and configure that instead. The root domain is dynamically constructed due to Ajax being finicky about the syntax. See Load Absolute URL explanation.

3) For bridge.php:

Bridge.php is a custom PHP script that communicates between our ticker script and lastRSS.php using Ajax. Open up this file using any text editor, and edit the variables as instructed by the comments. It is recommended you read up on the documentation for lastRSS to get a full understanding of what each variable means and how you can take advantage of all of the available features.

4) For lastRSS.php: No editing required. Upload as is.

And there you have it!

More information on Advanced RSS Ticker (Ajax invocation)

Once you’ve successfully installed the script, most day to day changes to the ticker is done easily and on the front end, via the main RSS ticker function:

<script type="text/javascript">
//rssticker_ajax(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
new rssticker_ajax("BBC", 1200, "ddbox", "bbcclass", 3500, "date+description")
</script>

A few notes on the parameters above:

  • “RSS_id” must be the name of the RSS feed to display as it appears in “bridge.php.”
  • “cachetime” is in seconds. A good time is at least 30 minutes, or 1800. *
  • “divId” is the desired ID for this ticker instance. Can be arbitrary but must be unique for each ticker instance on the page.
  • “bbcclass” is the CSS class name to be passed in to style this ticker instance.**
  • “optionalswitch” is a string used internally by the ticker script to decide what parts of an item to display. By default, it will just display the title+link of each item. You can pass in “date”, or “date+description” to display additional information.

* Regarding the cache time, a tip is to set it to 0 while you’re testing out the ticker, to make sure any changes are instantly visible, then change it back to the desired number afterwards. This is extremely helpful, for example, if you’ve made changes to “bridge.php” to change the format of the date output- that change will only show up instantly if you’ve set cache to 0.

** If you want a fading effect to occur between message change for the ticker, just add the code:

filter:progid:DXImageTransform.Microsoft.alpha(opacity€);
-moz-opacity: 0.8;

inside your CSS class for that ticker instance. It’s that easy! The fade effect uses up about 1/2 second, so you’ll want to increase the “delay” parameter accordingly if enabled.

0 Comments : 09.4.07

Ajax Generic Comments Module

Introduction
This article will show you how to use this generic comments module which implemented using php 4.0, mysql and Ajax.

This module is now running in http://www.newsblogpk.com/ you can see it in every project review page.

011.jpg

Here the user will enter his information and his comments.

02.jpg
When the user clicks on submit comment button the comment will be submited without any page refresh and the new coment will appear.

Installing Database Scripts

The database will be located in the source code folder in sourcecode/sql/script.sql just open your mysql client and run it to install the database.

How can I add it to my code

  1. Include the files of the comments module in your application folder.
  2. in your code include the comments.php file to be able to show the comments module
  3. The comments will show specific comments of every page according to the ForiegnID which identifies the page which will show the comment. (ie. the ForiegnID of the an article can be “A”+$i where $i is the id of the article in your application database. so you can use the same module in many pages(articles, news, reviews,..)
<?php
$i =0; // $i can be your article id
$ForeignID = "comment-$i" ;
require("includes/comments.php");?>

0 Comments : 09.4.07

Building a Drag-and-Drop Shopping Cart with AJAX

Keeping up with the latest Web technologies is tough nowadays. Every week it seems new sites are launched that push the envelope further and further in terms of what can be accomplished using just a Web browser.

The rise of AJAX over the past several months has taken over the development world and breathed new life into the Web. Although these techniques have been possible for many years now, the maturity of Web standards like XHTML and CSS now make it a viable alternative that will be viewable by all but the oldest browsers.

It’s also been possible to accomplish many of the same things using Flex or Flash, but the development cycle with those applications is typically more involved and the overhead often not justified.

We’re going to harness the power of the Scipt.aculo.us JavaScript library to provide our interaction. As their Web site states, this library “provides you with easy-to-use, compatible and, ultimately, totally cool JavaScript libraries to make your web sites and web applications fly, Web 2.0 style.” We’re also going to utilize the <CF_SRS> library to handle the actual AJAX data piping to our application. Both of these libraries are free for all to use, and they’re easier to integrate than you would think.

0 Comments : 09.4.07

Drag & Drop Sortable Lists with JavaScript and CSS

In Web applications I’ve seen numerous — and personally implemented a few — ways to rearrange items in a list. All of those were indirect interactions typically involving something like up/down arrows next to each item. The most heinous require server roundtrips for each modification…boo.

Then I came across Simon Cozens’ example of rearranging a list via drag & drop. I was so inspired I had to try it out myself.

Example: A Basic List
Essentially Simon Cozen’s example with some subtle enhancements. It’s not obvious, but go ahead and rearrange the items:

one
two
three
Click an  button to reveal the serialized version of the associated list.

In Firefox you can also drag the bullet to move an item. Keen.

Saving the reorderd list is possible by inspecting the DOM. All the sortable lists on this page retain their order via cookies (try rearranging a list and then reloading the page). Read a description of the technique on my blog.

0 Comments : 09.4.07

Fun with Drag and Drop with RICO

For those of you who haven’t seen OpenRico its another AJAX library, with quite a few cool extras. What I’m going to cover here is my first expiriment with Rico and their ‘drag and drop’ functionality. Getting basic drag and drop functionality is extremely easy with this library, and with just a bit of modification you can easily make it fit whatever you could want.

0 Comments : 09.4.07

How to Catch Evil Errors with OnError

Over on the Ajaxian blog they mention some evil code that was squelching exceptions (i.e. it was doing a try/catch and then doing nothing in the catch). I’ve run into this issue myself, having things fail mysteriously. One way to catch these kinds of problems is to use window.onerror (another reference):

var errorHandler = function(msg, url, linenumber) { alert(”Error: ” + msg + ” for ” + url + ” at ” + linenumber);};window.onerror = errorHandler;Now, whenever an error occurs, the error handler will get an error message, the URL that is the source of the error, and a line number! Window.onerror works in Firefox and IE, but I believe that it fails in Safari (continuing my general frustration with Safari as a browser).

0 Comments : 09.4.07

Alternate Ajax Techniques, Part 1

By now, nearly everyone who works in web development has heard of the term Ajax, which is simply a term to describe client-server communication achieved without reloading the current page. Most articles on Ajax have focused on using XMLHttp as the means to achieving such communication, but Ajax techniques aren’t limited to just XMLHttp. There are several other methods; we’ll explore some of the more common ones in this series of articles.

Dynamic Script Loading
The first alternate Ajax technique is dynamic script loading. The concept is simple: create a new <script/> element and assign a JavaScript file to its src attribute to load JavaScript that isn’t initially written into the page. The beginnings of this technique could be seen way back when Internet Explorer 4.0 and Netscape Navigator 4.0 ruled the web browser market. At that time, developers learned that they could use the document.write() method to write out a <script/> tag. The caveat was that this had to be done before the page was completely loaded. With the advent of the DOM, the concept could be taken to a completely new level.

The Technique
The basic technique behind dynamic script loading is easy, all you need to do is create a <script/> element using the DOM createElement() method and add it to the page:

var oScript = document.createElement(”script”);
oScript.src = “/path/to/my.js”;
document.body.appendChild(oScript);

Downloading doesn’t begin until the new <script/> element is actually added to the page, so it’s important not to forget this step. (This is the opposite of dynamically creating an <img/> element, which automatically begins downloading once the src attribute is assigned.)

Once the download is complete, the browser interprets the JavaScript code contained within. Now the problem becomes a timing issue: how do you know when the code has finished being loaded and interpreted? Unlike the <img/> element, the <script/> element doesn’t have an onload event handler, so you can’t rely on the browser to tell you when the script is complete. Instead, you’ll need to have a callback function that is the executed at the very end of the source file.

0 Comments : 09.4.07

« Previous PageNext Page »