- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 07:38 AM - edited 04-26-2023 07:40 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 08:01 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 07:39 AM
not possible using the javascript alert() function.
it always shows on the top.
You can use GlideDialogWindow and show UI page with OK button and it will show in the middle.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 07:45 AM
Thanks for the quick response Ankur!
Is this what I should be following? https://servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/
Or would you have a different site that I can follow?
It seems a little complex for adding a popup, I don't know why my client is not happy with that alert.
Thank you again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 08:01 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2023 08:09 AM
Thank you Ankur,
So, just to confirm... even if I use the UI Page, it might still not be in the center? it all depends on the browser? or the UI page will definitely put it in the middle.
Thank you