UI page render via GlideModal goes to a blank white screen!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2022 11:42 AM
Hi,
I am trying to open a UI page with GlideModal with the following code from a UI action in the global scope.
client: checked
onClick field: open();
function open(){
var gm = new GlideModal('ui_page');
gm.setTitle('Show title');
gm.setWidth(550);
gm.render();
}
However I just get a blank screen. Here is the UI page I am testing with:
name: ui_page
scope: Global
HTML / Jelly:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
<table>
<tr>
<td style="width:25%">
<g:form_label>
Name:
</g:form_label>
</td>
<td style="width:60%">
<input type="text" aria-label="Print your name" name="my_name" id="my_name" maxlength="25"/>
</td>
</tr>
<tr>
<td style="width:25%">
<g:form_label>
Select User:
</g:form_label>
</td>
<td style="width:60%">
<g:ui_reference name="user_ref" id="user_ref" query="user_nameSTARTSWITHa" table="sys_user" />
</td>
</tr>
<tr>
<td style="width:25%">
<g:form_label>
Select Incident:
</g:form_label>
</td>
<td style="width:60%">
<g:ui_choicelist name="my_category" id="my_category" table="incident" mandatory="true" field="category" query="active=true"/>
</td>
</tr>
<tr>
<td>
<g:dialog_buttons_ok_cancel ok_id="submitData" ok="return continueOK()" ok_type="button" ok_text="${gs.getMessage('Okay')}" ok_style_class="btn btn-primary" cancel_type="button" cancel_id="cancelData" cancel_style_class="btn btn-default" cancel="return continueCancel()"/>
</td>
</tr>
</table>
</g:ui_form>
</j:jelly>
Client Script:'
function continueOK() {
alert("OK clicked");
var gdw = GlideDialogWindow.get();
var name =gel('my_name').value;
var user = gel('user_ref').value;
var cat = gel('my_category').value;
var sys_id = gdw.getPreference('sys_id'); //get the values passed in the client script
var selected_value = gdw.getPreference('value'); //get the values passed in the client script
alert(name+"---"+user+"---"+cat+"---"+sys_id+"---"+selected_value);
GlideDialogWindow.get().destroy();
}
function continueCancel() {
alert("Cancel clicked");
GlideDialogWindow.get().destroy();
}
Processing Script:
var user = request.getParameter("user_ref"); //mention the name of the elment here
var my_name = request.getParameter("my_name"); //mention the name of the elment here
var category = request.getParameter("my_category"); //mention the name of the elment here
gs.info("Asif: testing "+user+"---"+my_name+"---"+category);
Any suggestions? Would be much appreciated, as I've been trying to debug this for hours.
Thanks,
Dan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2022 11:47 AM
I would replace
var gm = new GlideModal('ui_page');
gm.setTitle('Show title');
gm.setWidth(550);
gm.render();
with
var gm = new GlideDialogWindow('ui_page');
gm.setTitle('Show title');
gm.setSize(700,700);
gm.render();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2022 06:19 AM
Hey - thanks for your help. That yielded the same response. : /
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2022 08:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2022 05:37 PM
Hi
Thank you, but still no luck. Attached the page I get, I tried the following:
UI Action:
client: checked
onClick: open()
Script:
function open() {
var gm = new GlideModal('clone_cancel_popup', false, 'modal-lg');
gm.setTitle("Cancel");
gm.render();
}
And the UI page is one that came in my developer instance, and works when I "try it" from the UI page page.