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 UI page

Abhijit Das7
Tera Expert

Hi Everyone,

 

I am working with JS Frame in UI Page, on click of "OPEN " button a pop up should come with is resizable and draggable.

 

UI Script

bb11.png

UI Page:

HTML

 

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

	<div style = "width:600px; height: 450px; border: 1px solid">
	<!--<script src="https://cdn.jsdelivr.net/npm/jsframe.js/lib/jsframe.min.js"></script>-->

	<g:requires name="global.myUIscript.jsdbx" />

	<input type="button"  style= "background: blue; color: white ; border-radius: 1px; padding: 10px 22px; font-size: 16px; font: Sans-serif" value="OPEN" onclick="openepgp()"/>	
	      
		</div>			
</j:jelly>

 

CLIENT SCRIPT

 

function openepgp() {
   
    var jsFrame = new JSFrame();
    var frame01 = jsFrame.create({
        title: 'Window1',
        left: 20,
        top: 20,
        width: 320,
        height: 160,
        url: 'www.google.com', //URL to display in iframe
        //urlLoaded:Callback function called after loading iframe
        //urlLoaded: (frame) => {
        //Called when the url finishes loading
        //}
    });
    frame01.show();

}

 

Please guide me to get above functionality.

 

cc: @Community Alums 

 

Thanks in advance

 

3 REPLIES 3

Samaksh Wani
Giga Sage

Hello @Abhijit Das7 

window.open(url);

Use above line of code.


Please mark my solution as Accept if you find it helpful.

 

Regards,

Samaksh Wani

Hi @Samaksh Wani 

 

It did not work.. Sorry I wrote it by mistake @Samaksh Wani ( I forgot to write "not"). Please help further.

 

thanks

Hello @Abhijit Das7 

 

Pls mark my solution my solution as Accept, As it work for you. It will help futher user to find the solution.

 

Regards,

Samaksh Wani