SiMan CMS
Home
Download
Install
Upgrade
News
CMF Demo
Code Generator
Donate
EN
UA
Home
Demos
UI Modal Helper
UI Modal Helper
Modal with AJAX
Modal with Hardocded Content/Dimensions
Modal with DOM Content and Close Helper
Hidden DOM-element used as content for modal. Click to
close
Code Example
sm_on_action('modal', function () { sm_title('UI Modal Helper'); add_path_home(); add_path('Demos', 'index.php?m=demo'); add_path_current(); $ui = new UI(); $b=new Buttons(); //-------------------------------- $modal1=new ModalHelper(); $modal1->SetAJAXSource('index.php?m=demo&d=ajaxresponder&ajax=1'); $b->Button('Modal with AJAX'); $b->OnClick($modal1->GetJSCode()); //-------------------------------- $modal2=new ModalHelper(); $modal2->SetContent('Hardocded HTML content, custom with and height'); $modal2->SetWidth('200px'); $modal2->SetHeight('10%'); $b->Button('Modal with Hardocded Content/Dimensions'); $b->OnClick($modal2->GetJSCode()); //-------------------------------- $modal3=new ModalHelper(); $modal3->SetContentDOMSource('#hiddendiv'); $b->Button('Modal with DOM Content and Close Helper'); $b->OnClick($modal3->GetJSCode()); //-------------------------------- $ui->Add($b); $ui->div('Hidden DOM-element used as content for modal. Click to <a href="javascript:;" onclick="'.ModalHelper::GetCloseJSCode().'">close</a>', 'hiddendiv', '', 'display:none;'); $ui->Output(true); });
News
Announcements
Releases
Updates
Other News
Ads