CapaJC
ServiceNow Employee
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
06-07-2012
01:44 PM
Are you an admin that frequently needs to refresh the form you're on? Whether for testing purposes, or some other reason? Tired of right-clicking the form header to do it?
I know others have solved this their own way, but here's mine. A global UI Script with the following script puts an icon in your form header to refresh the form:
addRenderEvent(bounce);
function bounce() {
if (!g_user.hasRole("admin"))
return;
var e = $("mandatory_explained");
if (!e)
return;
var p = e.parentNode;
var span = document.createElement("span");
span.setAttribute("id", "refresh_this_form");
p.insertBefore(span, e);
span.innerHTML = " <span class='pointerhand' onclick='reloadWindow(window);' style='padding-left:4px;'><img width='16' height='16' src='images/icons/refresh.gifx'></span>";
}
2 Comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.