Marquee Text in Banner(Header)

Mohamed Faizel
Giga Expert

Recntly, I have set the marquee tag in banner text.It's working fine.The problem is when we logout the session its redirect to login page in that,marquee tag has shown in the banner.Could you please anyone help on this?
Please find the attachment for your refernce.

1 ACCEPTED SOLUTION

I haven't tried it yet, but a Global UI Script that modifies the header to your liking should do the trick.

Keep in mind that the marquee element is a non-standard element in HTML. You might want to build JavaScript similar to the news scroller instead or utilize jQuery animations that accomplish the same goal.

UPDATE: I just tried it and it works, but it is a bit tricky. I did this under the assumption that the "Rightmost" property is being used. It might be different if it were the My Company Banner field.

UI Script
Name: Change Banner
Active: true
Global: true
Script:



try { // Use try-catch so if the code fails somewhere else, it doesn't hose up JavaScript completely
window.parent.$('nav_header_text').innerHTML = '<strong>My custom banner</strong>'; // You can inject whatever HTML you like
// or do other magic to the window.parent.$('nav_header_text') object via PrototypeJS
} catch (e) {}


View solution in original post

14 REPLIES 14

tony_fugere
Mega Guru

The system property and My Company banner display in "raw" text instead of correctly interpretting the HTML. You'll notice your title bar on your browser suffers the same issue. This is a known "issue" or missing feature of ServiceNow. You'll likely not want to use HTML in your banner.


Mohamed Faizel
Giga Expert

Is there any other option to run a marquee text in header?

Thanks.


I haven't tried it yet, but a Global UI Script that modifies the header to your liking should do the trick.

Keep in mind that the marquee element is a non-standard element in HTML. You might want to build JavaScript similar to the news scroller instead or utilize jQuery animations that accomplish the same goal.

UPDATE: I just tried it and it works, but it is a bit tricky. I did this under the assumption that the "Rightmost" property is being used. It might be different if it were the My Company Banner field.

UI Script
Name: Change Banner
Active: true
Global: true
Script:



try { // Use try-catch so if the code fails somewhere else, it doesn't hose up JavaScript completely
window.parent.$('nav_header_text').innerHTML = '<strong>My custom banner</strong>'; // You can inject whatever HTML you like
// or do other magic to the window.parent.$('nav_header_text') object via PrototypeJS
} catch (e) {}


Thanks for suggest that script.I tried its working fine.There is no tag has shown when logout the session.