Code Index | File Index

Namespaces

Classes


Namespace CKEDITOR.ajax


Defined in: plugins/ajax/plugin.js.

Method Summary
Method Attributes Method Name and Description
<static>  
CKEDITOR.ajax.load(url, callback)
Loads data from an URL as plain text.
<static>  
CKEDITOR.ajax.loadXml(url, callback)
Loads data from an URL as XML.
Method Detail
<static> {String} CKEDITOR.ajax.load(url, callback)
Since: 3.0
Loads data from an URL as plain text.
// Load data synchronously.
var data = CKEDITOR.ajax.load( 'somedata.txt' );
alert( data );
// Load data asynchronously.
var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
    {
        alert( data );
    } );
Parameters:
{String} url
The URL from which load data.
{Function} callback Optional
A callback function to be called on data load. If not provided, the data will be loaded synchronously.
Returns:
{String} The loaded data. For asynchronous requests, an empty string. For invalid requests, null.

<static> {CKEDITOR.xml} CKEDITOR.ajax.loadXml(url, callback)
Since: 3.0
Loads data from an URL as XML.
// Load XML synchronously.
var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
alert( xml.getInnerXml( '//' ) );
// Load XML asynchronously.
var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
    {
        alert( xml.getInnerXml( '//' ) );
    } );
Parameters:
{String} url
The URL from which load data.
{Function} callback Optional
A callback function to be called on data load. If not provided, the data will be loaded synchronously.
Returns:
{CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an empty string. For invalid requests, null.

Copyright © 2003-2010, CKSource - Frederico Knabben. All rights reserved.