X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=doc%2Fajaxdev.xml;h=3e8d543666538ff6758c064ba233d5949fbfec50;hb=b1006944ac43c3f9297cc14db8d27afaa1f2d4ae;hp=8a48d016e781a3fc59aba70001e86cdd5116104f;hpb=bc0d89f1935a25de35b5458ddffc878a9c912a64;p=pazpar2-moved-to-github.git
diff --git a/doc/ajaxdev.xml b/doc/ajaxdev.xml
index 8a48d01..3e8d543 100644
--- a/doc/ajaxdev.xml
+++ b/doc/ajaxdev.xml
@@ -9,11 +9,11 @@
Pz2.js
- Pazapar2 comes with a small JavaScript library called pz2.js. This library is designed to simplify development of Ajax-based pazpar2 clients and alleviate programmer from low-level details like polling the web service, fetching and parsing returned XML output or managing timers, sessions and basic state variables.
+ Pazapar2 comes with a small JavaScript library called pz2.js. This library is designed to simplify development of an Ajax-based pazpar2 clients and alleviate programmer from the low-level details like polling the web service, fetching and parsing returned XML output or managing timers, sessions and basic state variables.
- The library supports most major browser's including Firefox 1.5+, IE 6+, Safari 2+, Opera 9+ and Konqueror.
+ The library supports most major browsers including Firefox 1.5+, IE 6+, Safari 2+, Opera 9+ and Konqueror.
@@ -25,7 +25,6 @@
In the session-less mode the library assumes that the client is identified on the server and the session Ids are not managed directly. This way of operation requires more sophisticated pazpar2 proxy (preferably a wrapper written in a server-side scripting language like PHP that can identify clients and relate them to open pazpar2 sessions).
-
Using pz2.js
@@ -87,7 +86,7 @@
}
- Pz2.js runtime
+ pz2.js on runtime
The search process is initiated by calling the search method on the instantiated pz2 object. To initiate short status reports and per-target status information methods stat and bytarget have to be called accordingly.
@@ -106,35 +105,32 @@
- To retrieve detailed record record command is called. When calling record command one may temporarily override its default callback by specifying the handler parameter. This might be useful when retrieving raw records that need to be processed differently.
+ To retrieve a detailed record the record command is called. When calling record command one may temporarily override its default callback by specifying the handler parameter. This might be useful when retrieving raw records that need to be processed differently.
- my_paz.record( recId, 2, 'opac', { âcallbackâ: temp_callback, âargsâ, caller_args});
+ my_paz.record (recId, 2, 'opac', { âcallbackâ: temp_callback, âargsâ, caller_args});
PARAMATERS ARRAY
-
- pazpar2path
+ pazpar2path
server path to pazpar2 (relative to the portal), when pazar2 is installed as a package this does not have to be set
-
- usesessions
+ usesessions
boolean, when set to true pz2.js will manage sessions internally otherwise it's left to the server-side script, default true
-
- autoInit
+ autoInit
bolean, sets auto initialization of pazpar2 session on the object instantiation, default true, valid only if usesession is set to true
-
- detailstylesheet
+ detailstylesheet
path to the xsl presentation stylesheet (relative to the portal) used for the detailed record display
+
errorhandler
callback function called on any, pazpar2 or pz2.js' internal, error
@@ -175,10 +171,10 @@
bytargettime
-
+
- PZ2 METHODS
+ METHODS
stop ()
stop activity by clearing timeouts
@@ -212,12 +208,15 @@
+
+ Pz2.js comes with a set of cross-browser helper classes and functions.
+
- AJAX HELPER CLASS
+ AJAX helper class
pzHttpRequest
- this is a cross-browses Ajax wrapper class
+ a cross-browser Ajax wrapper class
constructor (url, errorHandler)
create new request for a given url
@@ -235,7 +234,7 @@
- HELPER FUNCTIONS
+ XML helper functions
document.newXmlDoc (root)
create new XML document with root node as specified in parameter
@@ -269,3 +268,18 @@
+
+