Hi
i need some help in my JavaScript code
i currently have deployed a Javascript code to set up alerts on my SharePoint site telling people about IT updates.
i have 2 banners deployed, orange meaning update coming up, and a red banner indicating update in progress. and setting the time for banners to change in the JavaScript. I have linked to the javascript from Sharepoint Designer. The script works in Google Chrome, however it doesnt work in Internet Explorer version 9 or 11.
this is the code:
/* This script and many more are available free online at
The JavaScript Source!! http://www.javascriptsource.com
Created by: Anonymous | http://musikimiz.googlepages.comLicensed under: Creative Commons License
*/
function pixTimeChange() {
var t=new Date();
var h = t.getHours();
var r1="link to banner1";
var r2="link to banner 2";
var el=document.getElementById('myimage');
// See the time below. Note: The time is in 24 hour format.
// In the example here, "7" = 7 AM; "17" =5PM.
el.src = (h>=10 && h<15) ? r1 : r2;
}
// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.>
and this is the java link i have put in Designer:
<script type="text/javascript" src="timePictureChange.js"></script>
Credit goes to this page:
http://www.javascriptsource.com/time-date/time-of-day-picture-change.html[
^]
is there a way to make this work in Internet Explorer?
meta is currently set to :
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
I have tried to change the settings but when i do i have issues with the scrollbar
It is the script that Internet Explorer doesn't like
Thanks for your help on this.