Font Size:
Ask Joget AI

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
  • Automatically included in all userview pages.
  • A 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 at 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, check, after)

Used to hide a created and shown popup dialog element.

  • Parameters
    • id - a unique identifier of the popup dialog
    • check - optional; when true, checks for unsaved changes and asks for confirmation before hiding
    • after - optional callback invoked after the popup is hidden
  • Returns: a promise that resolves to true if the popup is hidden, or false if hiding is canceled
  • Sample code 
JPopup.hide("testPopup");

 

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

Loads a URL into a popup dialog, submitting the supplied parameters with GET or POST.

  • Parameters:
    • id - a unique identifier of the popup dialog
    • url - a 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 - optional HTTP method; use "GET" to send parameters in the URL, otherwise, parameters are submitted with POST. Defaults to POST.
  • Sample code: 
var params = {
    id : "1",
    name : "test"
};
  
JPopup.show("testPopup", "http://www.joget.org", params);

 

Created by Aadrian Last modified by Debanraj Ravindran on Nov 13, 2026