Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Help with iFrame in Pop Up

Abhijit Das7
Tera Expert

Hi Everyone,

 

I have requirement, where when I click on UI action then pop up should appear with iframe to display external URL. But, I should be able to edit form or anything which behind the pop up. Basically pop up should be movable and always on display with abilty to edit form.

 

Note : if you look into screenshot , when pop up is there then I cannot edit the form.

 

UI Action :

function showPage(){
	var gdw = new GlideDialogWindow('carear_frame');
	//gdw.setSize(750,300);
	gdw.setTitle("Test");
	gdw.render();
}

 

UI Page :

 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


<iframe src="https://google.com" height="400px" width="700px"></iframe> 

</j:jelly>

 

testing111.png

 

Is there any way where I can have a pop up and I should be able to edit behind form.

 

cc: @Ankur Bawiskar 

 

Thanks in advance

9 REPLIES 9

Slava Savitsky
Giga Sage

Try calling gdw.hideBackground() before gdw.render()

Hi @Slava Savitsky 

 

Your suggestion helped me to solve half of my problem . But I have two more issue, First being that is there way I can adjust size of pop up like we decrease or increase size of notepad with cursor. Second issue can I have minimize button which can minimize the pop up and  I should be able to use it when needed.

 

Thanks . 

Do you mean you want to let the user resize the popup?

Hi @Slava Savitsky 

 

The user should be able to resize the pop up using cursor according to his desire.

And one morething I have to achieve this in CSM workspace also - hideBackground() . How can I make background form editable .

function onClick(g_form) {
	var ui_page_id = 'e80a9ae9830302105dc771a6feaad374';
    g_modal.showFrame({
        url: '/ui_page.do?sys_id=' + ui_page_id,
        title: 'Test',
        size: 'xl',
        height: 500
    });

}

 

Thanks