Popup Box

Click one of the following buttons to display a popup box from the server

PHP/HTML Source:


class NewPage extends RaxanWebPage {

    protected function _init() {
        // register popup box response events
        $this->registerEvent('confirmOk', '.okShow');
        $this->registerEvent('confirmCancel', '.cancelShow');
        $this->registerEvent('promptResponse', '.promptResponse');

    // -- Event handlers --

    protected function showAlert($e) {
        $msg='This is a message from the server. Click the Ok button to continue.';

    protected function showConfirm($e) {
        $msg = "Do you want to learn more about Raxan for PHP?\n\n Click the ok button";

    protected function showPrompt($e) {
        $msg = "Please enter your name";

    protected function okShow($e){
        $this->header1->text('You\'ve clicked the Ok button :)');
    protected  function cancelShow($e){
        $this->header1->text('You\'ve clicked the Cancel button :(');

    protected  function promptResponse($e){
        $this->header1->text('You\'ve entered :'.$e->textVal());



    <button xt-bind="click,showAlert">Show Me an Alert box</button> -
    An alert box is used when you want to make sure information comes through to the user.

    <button xt-bind="click,showConfirm">Show Me a Confirm box</button> -
    A confirm box is often used if you want the user to verify or accept something.

    <button xt-bind="click,showPrompt">Show Me an Input box</button> -
    A prompt box is often used if you want the user to input a value.

<h2 id="header1"></h2>

Plugin Source:

HTML/JavaScript Source:

Data Source: