<script>
function a(event) {
//$("#IWBUTTON1").prop('value', $( "#slider" ).slider( "value" ));
var sValue = "&value=" + $( "#slider" ).slider( "value" );
executeAjaxEvent(sValue, null,"MyAjaxHandler",false, null, true);
}
$(function() {
$( "#slider" ).slider({
orientation: "horizontal",
range: "min",
max: 255,
value: 127,
slide: a,
change: a
});
});
</script>
In Delphi
procedure TFrmAdmin.MyAjaxHandler(EventParams: TStringList);
begin
IWButton1.Caption := EventParams.Values['which'];
WebApplication.ShowMessage(EventParams.Values['value']);
// WebApplication.ShowMessage(EventParams.Text);
end;
procedure TFrmAdmin.IWAppFormCreate(Sender: TObject);
begin
WebApplication.RegisterCallBack('MyAjaxHandler', MyAjaxHandler);
end;
Partager