1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
@@-- $1 action name onclick, onfocus
@@-- $2 the tag node ID to handle in the DOM tree
@@-- $3 a set of parameters to pass to the URL
@@-- $4-$8 are linked fields id to this request, all fields are passed as
@@-- $19 URL to call instead of the generated one
@@-- $20 the name of a function to call when this routine terminate
@@--
@@-- The final request is : /$1$$$2?$3&$4=value($4)&$5=value($5)
@@-- or : $19?$3&$4=value($4)&$5=value($5)
@@-- with value(name) being the value for the field named "name".
@@SET@@ XML_ACTION = $1
@@SET@@ XML_ID = $2
@@SET@@ XML_PARAMETERS = $3
@@SET@@ XML_F1 = $4
@@SET@@ XML_F2 = $5
@@SET@@ XML_F3 = $6
@@SET@@ XML_F4 = $7
@@SET@@ XML_F5 = $8
@@SET@@ CONSTANT_URL = $19
@@SET@@ XML_ONCOMPLETE = $20
{
@@IF@@ @_CONSTANT_URL_@ /= ""
var rurl="@_CONSTANT_URL_@";
@@ELSE@@
var rurl="/@_XML_ACTION_@$@_XML_ID_@";
@@END_IF@@
var rpars = "";
var roncomplete = "";
@@IF@@ @_XML_PARAMETERS_@ /= ""
rpars = "@_XML_PARAMETERS_@";
@@END_IF@@
@@IF@@ @_XML_F1_@ /= ""
if (rpars != "")
rpars = rpars + "&";
rpars = rpars + AWS.Ajax.serialize('@_XML_F1_@');
@@END_IF@@
@@IF@@ @_XML_F2_@ /= ""
if (rpars != "")
rpars = rpars + "&";
rpars = rpars + AWS.Ajax.serialize('@_XML_F2_@');
@@END_IF@@
@@IF@@ @_XML_F3_@ /= ""
if (rpars != "")
rpars = rpars + "&";
rpars = rpars + AWS.Ajax.serialize('@_XML_F3_@');
@@END_IF@@
@@IF@@ @_XML_F4_@ /= ""
if (rpars != "")
rpars = rpars + "&";
rpars = rpars + AWS.Ajax.serialize('@_XML_F4_@');
@@END_IF@@
@@IF@@ @_XML_F5_@ /= ""
if (rpars != "")
rpars = rpars + "&";
rpars = rpars + AWS.Ajax.serialize('@_XML_F5_@');
@@END_IF@@
@@IF@@ @_XML_ONCOMPLETE_@ /= ""
roncomplete = @_XML_ONCOMPLETE_@
@@END_IF@@
AWS.Ajax.XML.request (rurl, rpars, roncomplete);
return (false);
}
|