Move the ALERT('') popup message to the middle of the screen

AngelP83
Giga Guru

Hello,

Is it possible to move the alert(' HELLO WORLD') script to the middle of the page (middle vertically)?

At the moment, it is in the middle horizontally, but I was asked to also move it vertically.  According to: https://docs.servicenow.com/bundle/tokyo-application-development/page/script/general-scripting/refer...  That cannot be done.  I might need to create my own script?  

Thank you

 

Miguel33_0-1682519858470.png

 

1 ACCEPTED SOLUTION

@AngelP83 

As per Karan it also depends on browser.

But we never know which browser end user uses.

you can use UI page in that case and show the pop-up in the middle.

the link you shared is the one which you need to follow

sharing additional links as well

https://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/ 

https://www.servicenowelite.com/blog/2013/11/24/glidedialog-window-example 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

5 REPLIES 5

Karan Chhabra6
Mega Sage
Mega Sage

Hi @AngelP83 ,

 

It depends on the browser as well, for ex. in firefox, the alert box shows up in the middle

KaranChhabra6_0-1682520683137.png