ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
with_js_binding.php File Reference

Go to the source code of this file.

Functions

 with_js_binding ()
 

Function Documentation

◆ with_js_binding()

with_js_binding ( )

Definition at line 2 of file with_js_binding.php.

References $DIC, and Vendor\Package\$f.

3 {
4  global $DIC;
5  $f = $DIC->ui()->factory();
6  $renderer = $DIC->ui()->renderer();
7 
8  return $renderer->render(
9  $f->button()->standard("Goto ILIAS", "#")
10  ->withOnLoadCode(function ($id) {
11  return
12  "$(\"#$id\").click(function() { alert(\"Clicked: $id\"); return false;});";
13  })
14  );
15 }
$DIC
Definition: xapitoken.php:46