-
-
Save jayzes/1001093 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
//Get any tickets from view 22567988, outage Tickets that are currently open. | |
new Ajax.Request('/rules/22567988', { | |
method:'get', | |
asynchronous: true, | |
onSuccess: function(transport){ | |
var obj = transport.responseText.evalJSON(); | |
$('active-views').innerHTML = '<p>' + obj.length + ' current service outage.' | |
+ ' First outage is ' | |
+ obj[0].subject + '</p>' | |
//Loop through the returned tickets to strip out and print ticket details. | |
for(var i=0;i<obj.length;i++){ | |
document.write("<b>obj["+i+"] is </b>=>"+obj[i]+"<br>"); | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment