This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

eventlog.lp
#11

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Event log</title>
<script src="/user/jquery.js.gz"></script>
<link rel="stylesheet" href="/user/bootstrap.css">
</head>
<body>
<script>
$(function() {
var items = ["Mon 16\/06\/2025 14:43:45 7","Mon 16\/06\/2025 14:12:39 239","Mon 16\/06\/2025 14:12:30 150"]
, container = $('.container')
, header;
$.each(items, function(index, item) {
var chunks = item.split(' ')
, newheader = chunks.shift() + ' ' + chunks.shift();
// output data header each time it changes
if (newheader != header) {
header = newheader;
$('<h3></h3>').text(header).appendTo(container);
}
// output log entry
$('<p></p>').text(chunks.join(' ')).appendTo(container);
});
});
</script>
<div class="container"></div>
</body>
</html>
Reply


Messages In This Thread
eventlog.lp - by sjfp - 15.06.2025, 13:02
RE: eventlog.lp - by admin - 16.06.2025, 06:45
RE: eventlog.lp - by sjfp - 16.06.2025, 07:51
RE: eventlog.lp - by admin - 16.06.2025, 07:54
RE: eventlog.lp - by sjfp - 16.06.2025, 10:25
RE: eventlog.lp - by admin - 16.06.2025, 12:17
RE: eventlog.lp - by sjfp - 16.06.2025, 13:25
RE: eventlog.lp - by admin - 16.06.2025, 13:26
RE: eventlog.lp - by sjfp - 16.06.2025, 13:51
RE: eventlog.lp - by admin - 16.06.2025, 13:54
RE: eventlog.lp - by sjfp - 16.06.2025, 14:12
RE: eventlog.lp - by admin - 16.06.2025, 14:15
RE: eventlog.lp - by sjfp - 16.06.2025, 14:49

Forum Jump: