Showing posts with label Ajax. Show all posts
Showing posts with label Ajax. Show all posts

What is Ajax Request?

Some PHP programmers would argue that the most important use of JavaScript is to provide Ajax functionality to your programs. Whether or not you agree, Ajax is certainly a central part of today’s Internet. Standing for Asynchronous JavaScript and XML, Ajax is really a misnomer because it often has little to do with XML as it can handle all manner of file types. However, when Microsoft first introduced the feature in Internet Explorer 5 (back in...

Validate Email address

  Checking Email  Web sites often use email addresses as usernames because they are guaranteed to be unique, as long as they are valid. In addition, the organizations can use the email addresses to communicate with their users later. You do not have to initiate a server round trip just to validate an email address, however. This task can be initiated in the client, which cancels the submission of the username to the server...

Validate a Text Field

No web developers want their Ajax applications to hit the network with requests if the users leave necessary text fields blank. Thus, checking that input elements of type text and the large boxes called textareas in HTML contain values is one of the most common forms of validation. This hack shows the code for checking if a text control is blank. The inline way of doing this is by assigning a check for the field's value in the text field's...

Ajax code

  The keystone of AJAX is the XMLHttpRequest object. Different browsers use different methods to create the XMLHttpRequest object. Internet Explorer uses an ActiveXObject, while other browsers uses the built-in JavaScript object called XMLHttpRequest.   <html> <body> <script type="text/javascript"> function ajaxFunction() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); ...

AJAX is Based on Web Standards

AJAX stands for Asynchronous JavaScript And XML. AJAX is a type of programming made popular in 2005 by Google (with Google Suggest). AJAX is not a new programming language, but a new way to use existing standards. With AJAX you can create better, faster, and more user-friendly web applications. AJAX is based on JavaScript and HTTP requests. Asynchronous JavaScript and XML AJAX is not a new programming language, but a technique for creating...

XMLHttpRequest-Ajax

To do this, you must understand the three ways of creating an XMLHttpRequest object• IE 5: request = new ActiveXObject("Microsoft.XMLHTTP")• IE 6+: request = new ActiveXObject("Msxml2.XMLHTTP")• All others: request = new XMLHttpRequest()This is the case because Microsoft chose to implement a change with the release ofInternet Explorer. The readyState propertyNow we get to the nitty-gritty of an Ajax call, which all hangs on the readyState property.The “asynchronous” aspect of Ajax allows the browser to keep accepting userinput and changing the...

Testing Ajax Event Handlers using Jasmine Spies

JavaScript has several methods that execute asynchronously, such as setTimeout(), Ajax calls, as well as event-driven processes. These examples all have to wait until the current execution thread comes to an end and surrenders to the next event, making asynchronous processes hard to test. Fortunately, the Jasmine JS testing library comes equipped with a couple of tools for handling callback...

magic methods?

Magic methods are the members functions that is available to all the instance of class Magic methods always starts with “__”. Eg. __construct All magic methods needs to be declared as public...

What is CURL?

CURL stands for Client URL Library. CURL allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP’s ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication....

What is triggers?

A trigger is a database object which is associated with particular database table. Triggers gets called automatically when particular event(INSERT, UPDATE, DELETE) occurs on table....

What is LAMP?

LAMP means combination of Linux, Apache, MySQL and PH...

How get the value of current session id?

Session_id() returns the session id for the current sessio...

How register the variables into a session?

session_register ($session_var) function. (adsbygoogle = window.adsbygoogle || []).push({}); ...

What are the different tables present in mysql?

Total 5 types of tables we can create 1. MyISAM 2. Heap 3. Merge 4. InnoDB 5. ISAM 6. BDB MyISAM is the default storage engi...

Load from the Server-Ajax

The first is to keep the templates remote and use an XMLHttpRequest object to retrieve additional markup. This approach is more convenient for single-page applications than for multiple-page applications...

Ajax Animations

An animated PNG image is only one of the embellishments you see in web applications today. Most animations are created by manipulating elements on a page. Part of developing an application on the Web with Ajax is making it a Web 2.0 application...

magic_quotes_gpc, magic_quotes_runtime

Magic quotes is the name of a PHP feature that automatically quotes inputdata, by using the addslashes() function. Historically, this was used so thatform data could be used directly in SQL queries without any security or quotingissues. Today, form data is used for much more, and magic quotes quicklyget in the way. We recommend that you disable this feature, but portable codemust be aware of these settings and deal with them appropriately by callingstripslashes() on GPS (GET, POST, and cookie) dat...

Associative Arrays?

You can use string values as keys. For example, you might create an arraylike this: $myStuff = array();$myStuff[“name”] = “andy”;$myStuff[“email”] = “andy@fsdsd.ca”;Print $myStuff[“name”]; Associative arrays are different than normal (numeric-indexed) arrays insome subtle but important ways:The order is undefined. Regular arrays are always sorted based on thenumeric index. You don’t know what order an associative array will bebecause the keys aren’t numeric.  You must specify a key. If you’re building a numeric-indexed array, PHPcan always...

$_GET , $_POST,$_COOKIE??

$_GET contains any variables provided to a script through the GET method.  $_POST contains any variables provided to a script through the POST method.  $_COOKIE contains any variables provided to a script through a cooki...

What line should you add to the Apache configuration file to ensure that the .php extension is recognized?

This line ensures that Apache will treat files ending with the .php extension asPHP scripts:AddType application/x-httpd-php .p...