JPopup

This page details the JPopup endpoints and the actions they support. It covers key functions, parameters, and sample code for easy implementation.

  • URL: /jw/js/json/ui_ext.js
  • Auto included in all userview pages.
  • Convenient method to create/show/hide a popup dialog to display a page.

 

create(id, title, width, height)

Used to create a popup dialog element.

  • Parameters:
    • id - a unique identifier of the popup dialog
    • title - a title to display on the top of the popup dialog (Optional)
    • width - the width of the popup dialog box (Optional)
    • height - the height of the popup dialog box (Optional) 
  • Sample code:
JPopup.create("testPopup", "Test Popup Dialog");

 

hide(id)

Used to hide a created and shown popup dialog element.

  • Parameters
    • id - a unique identifier of the popup dialog
  • Sample code 
JPopup.hide("testPopup");

 

show(id, url, params, title, width, height, action)

Used to create a popup dialog element.

  • Parameters:
    • id - a unique identifier of the popup dialog
    • url - an URL of a page to show in the popup dialog
    • params - a JSON object to pass a parameter and its value (Optional)
    • title - a title to display on the top of the popup dialog (Optional)
    • width - the width of the popup dialog box (Optional)
    • height - the height of the popup dialog box (Optional)
    • action - Get/Post. Default to Post (Optional) 
  • Sample code: 
var params = {
    id : "1",
    name : "test"
};
  
JPopup.show("testPopup", "http://www.joget.org", params);

 

Created by Damian Last modified by Aadrian on Dec 13, 2024