ajax2

beasscript-logo-small

Simple Work with Ajax

 

shtml=ajax=functionname=parameter

 

generate a html-Function with name "[functionname]_start(as_command,as_parameter){}
additional you must create a html-Function [functionname]_retrieve() which is retrieve the data

and in the development - Area "ajax" you need a script for execute the command

 

Example

 

shtml=ajax=updateentry=command=newword

? <input type="text" name="myentry" vallue="" size="40" onchange="updateentry_start('updateword',this.value)">

 

In App - Area "Ajaxcode you've to parameters

ajaxcommand (the first parameter)

ajaxparameter (second parameter)

 

if <ajaxcommand> = updateword then

 // ... make something with variable '<ajaxparameter,html2string>'

end if

 

if you need more parameter, you can work with "|" as delimiter

shtml=ajax=updateentry=command=newword

? <input type="text" name="myentry" vallue="" size="40" onchange="updateentry_start('updateword','firstparameter|secondparameter|'+this.value)">

 

in Ajaxcode

setvar=ls_parameter1=<ajaxparameter, token 1 |>

setvar=ls_parameter2=<ajaxparameter, token 2 |>

setvar=ls_parameter3=<ajaxparameter, token 3 |>

(...)

 

 

Create the Call-Function [functionname]_start, the Receipt from Ajax call the function [functionname_receipt]. The second command you must create self. See ajax2