Your First AJAX Application

0

To understand how AJAX works, we will create a small AJAX application.

First, we are going to create a standard HTML form with two text fields: username and time. The username field will be filled in by the user and the time field will be filled in using AJAX.

The HTML file will be named "testAjax.htm", and it looks like this (notice that the HTML form below has no submit button!):

<html><body>
<form name="myForm">Name: <input type="text" name="username" />Time: <input type="text" name="time" /></form>
</body></html>

AJAX Http Requests

0

AJAX Uses HTTP Requests

In traditional JavaScript coding, if you want to get any information from a database or a file on the server, or send user information to a server, you will have to make an HTML form and GET or POST data to the server. The user will have to click the "Submit" button to send/get the information, wait for the server to respond, then a new page will load with the results.

Because the server returns a new page each time the user submits input, traditional web applications can run slowly and tend to be less user-friendly.

With AJAX, your JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object

With an HTTP request, a web page can make a request to, and get a response from a web server – without reloading the page. The user will stay on the same page, and he or More >

AJAX Introduction

0

AJAX stands for Asynchronous JavaScript And XML.

What You Should Already Know

Before you continue you should have a basic understanding of the following:

  • HTML / XHTML
  • JavaScript

AJAX = Asynchronous JavaScript and XML

AJAX is not a new programming language, but a technique for creating better, faster, and more interactive web applications.

With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page.

AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.

The AJAX technique makes Internet applications smaller, faster and more user-friendly.

  AJAX is a browser technology independent of web server software.

AJAX is Based on Web Standards

AJAX is based More >

Spinning the Web of Success

0

They say that among the most powerful tool in advertising and marketing, the internet is considered to be the cheapest and the most effective. The internet, as we all know, is a media that is widely used today as a means for information gathering, research, and entertainment. The internet can provide a wide range of audiences locally and globally. It is also the ticket to enter the ever growing International Market.

To be able to successfully market or advertise ones business to the internet, one must know the many strategies in attracting the right kind of audiences. There are a lot of companies out there that can provide you with solutions about internet marketing, and among them is the Optimind Technology Solutions.

The Optimind Technology Solutions is an internet marketing firm that offers such services of internet marketing and solutions. The Optimind Technology Solutions are can also provide the services More >

Checkbox Label Positioning in CSS

0

Many decisions in form layout and label positioning are largely personal preference. Arguments can be made (and are) for a number of different general layouts. I prefer this:

Lining up the input fields gives a nice clean left edge line and allows the eye to travel the fields easily. Having the labels right aligned connects them to the fields much better than left alignment does.

I generally accomplish this layout for input type=texts, selects and textareas using the following HTML markup:

<p class="label_field_pair"> <label for="foo">Foo:</label> <input type="text" id="foo" /> </p>

And the following CSS:

p.label_field_pair { clear: both; float: none; } p.label_field_pair label { clear: left; display: block; float: left; text-align: right; width: 100px; } p.label_field_pair input { clear: right; float: left; margin-left: 10px; width: 200px; }

The result looks like this

I used to use the same general technique for checkboxes as well:

<p class="label_checkbox_pair"> <input type="checkbox" More >

Example colour scheme

Managing colour schemes in CSS

0

Managing colour schemes in CSS can be difficult. With a bit of PHP you can take control of colour schemes in your stylesheets.

Why bother?

A fair question. The find and replace option will do a good job of changing the colours in your stylesheet if you need to. But wouldn’t it be easier if you just had to change the colours in one place? What if you want to use a variable to set the colours? You would need to change many lines of code. Learning from CSS it is much easier and less time consuming to keep everything in one place. Furthermore I believe it helps to maintain integrity over a design.

An example colour scheme

Here’s an example colour scheme. I usually like to have five colours ranging from darker primary colours to supplementary highlight colours. These colours have a logic in the design. They are More >

Safari

Mac Browser Love-in

0

Although I love Firefox for Mac I can’t deny that it is very slow compared to other browsers. After reading of the adventures of the Mac browser pimp Jon Hicks I decided to experiment a bit more in my browser usage. Where did I end up? Well in a multitude of places with multiple browsers open!

Safari is great but there are a number of things it doesn’t do. Coupled with the fact that many plugins (including Flash) are not yet formally released for Universal Binary it isn’t quite everything I want. I found this page on browser speeds for the mac which has some interesting results. Camino is not bad and Opera would seem to be the Daddy.

So what am I using at the moment?

For development More >

Checking design layouts in Photoshop

Writing Good XHTML and CSS Part 2

0

The second in a series of good practices for writing XHTML and CSS looking at writing clean, maintainable code and dealing with browser hell problems.

In Part 1 we went over the production environment you will need to write Professional XHTML and CSS. This included software and hardware as some excellent extensions you can get for the Firefox browser. Part two looks at good practices for writing maintainable and lasting code.

Format code cleanly

Whether you are coding on the fly or from a layered Photoshop file it is important to write your code in a manner that is maintainable and readable by others. It is unlikely you will remember what you did in six months time so lay your code out cleanly.

Indent your code from the left edge to allow the reader to follow the flow of a More >

Go to Top