59 lines
1.9 KiB
HTML
59 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Case Link Generator</title>
|
|
<script>
|
|
function generateLink() {
|
|
const caseNumber = document.getElementById('caseNumberInput').value.trim().toUpperCase();
|
|
|
|
if (caseNumber) {
|
|
const caseYear = caseNumber.substring(0, 2);
|
|
const caseType = caseNumber.substring(2, 4);
|
|
const caseRest = caseNumber.substring(4);
|
|
|
|
let circuitId;
|
|
if (caseType === "CY") {
|
|
circuitId = "SMPDB0001_CT07"; // Clay County (7th Circuit)
|
|
} else if (caseType === "CA") {
|
|
circuitId = "CT17"; // Cass County (17th Circuit)
|
|
} else if (caseType === "16") {
|
|
circuitId = "CT16"; // Jackson County (16th Circuit)
|
|
} else if (caseType === "AE") {
|
|
circuitId = "SMPDB0001_CT06"; // Platte County (6th Circuit)
|
|
} else {
|
|
alert('Invalid case type.');
|
|
return;
|
|
}
|
|
|
|
const link = `https://www.courts.mo.gov/cnet/cases/newHeader.do?inputVO.caseNumber=${caseYear}${caseType}${caseRest}&inputVO.courtId=${circuitId}`;
|
|
|
|
const linkElement = document.createElement('a');
|
|
linkElement.href = link;
|
|
linkElement.textContent = caseNumber;
|
|
linkElement.target = "_blank"; // this makes the link open in a new window/tab
|
|
|
|
document.getElementById('links').appendChild(linkElement);
|
|
document.getElementById('links').appendChild(document.createElement('br'));
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Case Link Generator</h1>
|
|
<input id="caseNumberInput" type="text" placeholder="Enter case number">
|
|
<button onclick="generateLink()">Generate Link</button>
|
|
<div id="links"></div>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|