Difference between #242 and #243 of
Yii v2 snippet guide

Revision #243 has been created by rackycz on Oct 8, 2020, 2:41:47 PM with the memo:

Modal and ajax
« previous (#242) next (#244) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
// This section can be moved to "\views\layouts\main.php"
yii\bootstrap\Modal::begin([
'header' => '<span id="myModalTitle">Title</span>',
'id' => 'myModalDialog',
'size' => 'modal-lg',
  'clientOptions' => [
 
      // https://getbootstrap.com/docs/3.3/javascript/#modals-options
 
      'keyboard' => false, // ESC key won't close the modal
 
      'backdrop' => 'static', // clicking outside the modal will not close it
 
      ],
 
]);
echo "<div id='myModalContent'></div>";
yii\bootstrap\Modal::end();

$this->registerJs(
"// If you use $(document).on, it will handle also events on elements rendered by AJAX.
[...]
7 0
4 followers
Viewed: 274 852 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: a year ago
Update Article

Revisions

View all history