Liking cljdoc? Tell your friends :D

ajax-lib.core


ajaxcljs

(ajax params-map)

Universal ajax call

:url Define url address to communicate with :request-method Define request method ex. GET, POST... :success-fn Specify function name which will handle success

                     example: (defn success-handler
                                "Simple ajax success handler"
                                [xhr
                                 params-map]
                                implementation..)

:error-fn Specify function name which will handle error

                     example: (defn error-handler
                                "Simple ajax error handler"
                                [xhr
                                 params-map]
                                implementation..)

:request-header-map Define map with key value pairs for request header :request-property-map Define map with key value pairs for setting property values :entity Define content that you want to send :entity-fn-params In case entity is a function, define vector of it's params example: [param1 param2] :log-it true/false by default nil

Universal ajax call

:url                     Define url address to communicate with
:request-method          Define request method ex. GET, POST...
:success-fn              Specify function name which will handle success

                         example: (defn success-handler
                                    "Simple ajax success handler"
                                    [xhr
                                     params-map]
                                    implementation..)

:error-fn                Specify function name which will handle error

                         example: (defn error-handler
                                    "Simple ajax error handler"
                                    [xhr
                                     params-map]
                                    implementation..)

:request-header-map      Define map with key value pairs for request header
:request-property-map    Define map with key value pairs for setting property values
:entity                  Define content that you want to send
:entity-fn-params        In case entity is a function, define vector of it's params
                          example: [param1 param2]
:log-it                  true/false by default nil
sourceraw docstring

ajax-errorcljs

(ajax-error xhr)

Handle details error

Handle details error
sourceraw docstring

base-urlcljs

source

get-responsecljs

(get-response xhr)

Get response from XMLHttpRequest

Get response from XMLHttpRequest
sourceraw docstring

onloadcljs

(onload xhr params-map)

Ajax onload function

Ajax onload function
sourceraw docstring

onreadycljs

(onready xhr params-map)

Ajax onreadystatechange function

Ajax onreadystatechange function
sourceraw docstring

set-request-headercljs

(set-request-header xhr [key value])

Set request header

Set request header
sourceraw docstring

set-request-propertycljs

(set-request-property xhr [key value])

Set request property

Set request property
sourceraw docstring

sjaxcljs

(sjax params-map)

Synchronous javascript and XML

Same as ajax, except this function waits for server response

Synchronous javascript and XML

Same as ajax, except this function waits for server response
sourceraw docstring

with-credentialscljs

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close