How to redirect to URL from UI Page

Deepthi13
Tera Expert

Hi respected,

How to redirect to URL from UI Page and UI page is being called by UI action.  please find below screen shot I am not getting link but the message is getting displayed. Please find the UI page and Ui action. Please help on the same

UI ACTION:

function showUpgradeDialog() {
var gDialog = new GlideDialogWindow('hp_upgrade_dialog');
gDialog.setTitle(new GwtMessage().getMessage('hp_upgrade_dialog_title'));
gDialog.setWidth(500);
gDialog.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">
<div style="padding:4px;">
${gs.getMessage('hp_upgrade_dialog_1')}
<p>${gs.getMessage('hp_upgrade_dialog_2')} <a href = 'https://www.google.com'></a></p>

</div>
</j:jelly>

 

find_real_file.png

5 REPLIES 5

Khozema Attar1
Tera Guru

Hello Deepthi,

 

You can refer to the following link :

 

https://www.servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/

 

Thanks,

Khozema

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,


https://community.servicenow.com/community?id=community_question&sys_id=12c113addbdcdbc01dcaf3231f961963

 

 

https://community.servicenow.com/community?id=community_question&sys_id=54fd07addb9cdbc01dcaf3231f9619dd : Perfect solution.

 

response.sendRedirect(url); is the way to go

 


Thanks,
Ashutosh

 

Hi Asutosh,

 

I tried by using the links given u, but still I am not able to get it. please help.

UI PAGE:

HTML:

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div style="padding:4px;">
${gs.getMessage('hp_upgrade_dialog_1')}
<p>${gs.getMessage('hp_upgrade_dialog_2')} <a href = 'https://www.google.com'></a></p>
<h1>Open Source Announcement</h1>
<h4>Some software components of this product incorporate source code covered under open source licenses.</h4>
<h4><a href="sys_attachment.do?sysparm_referring_url=tear_off$[AMP]view=true$[AMP]sys_id=4e689a74c3031300ce6a3e5474d3ae62">Cick here</a>$[SP]for more information about the open source licenses used in this product. With respect to the free/open source software listed in this document, if you have any questions or wish to receive a copy of the source code to which you are entitled under the applicable free/open source license(s) (such as the GNU Lesser/General Public License), please contact us at opensource@servicenow.com.
</h4>
<p>url </p>
</div>
</j:jelly>

 

Processing Script: 

 

{

var url = 'www.google.com';
response.sendRedirect(url);


}

Hi Deepthi,

you want to redirect when user clicks on the link?

Because your redirection code is in processing script as well?

Can you explain to which link it should go and when?

Regards

Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader