
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 07:59 PM
I'm trying to test a simple UI Script, but feel kind of lost - it's not working.. The idea is very simple - I want to make "Homepage" menu item under Self-Service red. I know the element id, but script is not working... I even added addLoadEvent function, no success... any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2015 11:37 PM
Hi Andrew,
The following global UI script does the trick in Geneva
try {
getTopWindow().document.getElementById("4aeebcd20a0a0b9a00572ae3ad68b072").style.backgroundColor = 'red';
}
catch(e){
}
Thanks,
Berny

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 08:27 PM
Can you do an alert(elem) and see if it returns any object?
I think it is not getting handle of that element.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 08:32 PM
When I run the script as it shown on the screenshot I got an alert message 'null is not an object (evaluating 'elem.style')', that means there is some exception, but I have not idea what might cause that exception.. I tried gel() instead of getElementById with no success.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 08:37 PM
This means that elem is null.
Try using var elem = parent.document.getElementByID("id"); and let me know what happens.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2015 07:43 AM
That doesn't work