Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <!-- Latest compiled and minified CSS -->
- <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet"><!-- jQuery library -->
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js">
- </script><!-- Latest compiled JavaScript -->
- <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js">
- </script>
- <style>
- td {
- border: 1px solid black;
- }
- </style>
- <title></title>
- </head>
- <body>
- <button onclick="toggleView('searchPage')">Search</button> <button onclick="toggleView('suspectView')">Current Suspect</button>
- <div id="searchPage">
- <h3>A demonstration of how to access a Text Field</h3><input id="searchText" type="text" value="Input your search here"> <button onclick="search()">Search</button>
- <table id="searchResults"></table>
- </div>
- <div id="suspectView">
- <table border="0" id="searchResults">
- <tr>
- <td>
- <table border="0" class="table">
- <thead class="thead-inverse">
- <tr>
- <td colspan="2">Suspect Details</td>
- </tr>
- </thead>
- <tr>
- <td style="width:10%">First Name:</td>
- <td id='firstname' style="width:90%">John</td>
- </tr>
- <tr>
- <td style="width:10%">Last Name:</td>
- <td id='lastname' style="width:90%">Doe</td>
- </tr>
- <tr>
- <td style="width:10%">Suspect Profession:</td>
- <td id='profession' style="width:90%">Thief</td>
- </tr>
- <tr>
- <td colspan="2">Police Interactions</td>
- </tr>
- <tr>
- <td colspan="2">
- <ul class="list-group">
- <li class="list-group-item list-group-item-success">11/24/2017 11:26PM - Sheriff Barrett: Suspect was caught running a red light at 108 MPH. Short 10-80 ensued, suspect 10-50'ed and surrendered immediately. Suspect accepted charges without representation for 20 months.</li>
- <li class="list-group-item">11/24/2017 09:52PM - Sheriff Bidwell: Suspect was clocked going over 100MPH on Los Santos. Searching his plate in the DMV revealed suspect identity. Unable to catch suspect, added BOLO for his vehicle Plate of 01TMV381.</li>
- </ul>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <table border="0">
- <tr>
- <td colspan="2">Known Vehicles</td>
- </tr>
- <tr>
- <td>Vehicle Name</td>
- <td>Vehicle Plate</td>
- </tr>
- <tr>
- <td>Vehicle 1</td>
- <td>01TMV381</td>
- </tr>
- <tr>
- <td>Vehicle 2</td>
- <td>01TMV381</td>
- </tr>
- <tr>
- <td colspan="2">Past Charges</td>
- </tr>
- <tr>
- <td colspan="2">
- <ul class="list-group">
- <li class="list-group-item list-group-item-success">11/24/2017 11:26PM - Sheriff Barrett: 1x Fleeing & Eluding, 1x Reckless Driving, 1x Failure to Stop. 20 Months, $16,000 Fine</li>
- <li class="list-group-item list-group-item-success">11/24/2017 11:26PM - Sheriff Barrett: 1x Fleeing & Eluding, 1x Reckless Driving, 1x Failure to Stop. 20 Months, $16,000 Fine</li>
- </ul>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <script>
- var pages = ["searchPage", "suspectView"];
- function search() {
- var searchText = document.getElementById("searchText").value;
- var table = document.getElementById("searchResults");
- var row = table.insertRow(0);
- var cell1 = row.insertCell(0);
- var cell2 = row.insertCell(1);
- cell1.innerHTML = "Search Text: " + searchText;
- cell2.innerHTML = "javascriptLinkText";
- }
- function toggleView(view) {
- var totalPages = pages.length;
- var i;
- for (i = 0; i < totalPages; i++) {
- var x = document.getElementById(pages[i]);
- if (pages[i] === view) {
- x.style.display = "block";
- console.log("Setting " + pages[i] + " to block");
- } else {
- x.style.display = "none";
- console.log("Setting " + pages[i] + " to none");
- }
- }
- }
- document.getElementById("suspectView").style.display = "none";
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement