Initial commit
This commit is contained in:
32
indexes/search/search.php
Normal file
32
indexes/search/search.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Search</title>
|
||||
<script src="./iframe.js"></script>
|
||||
<link rel="stylesheet" href="search.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<br><br><br><br><br><br><br><br>
|
||||
<div style="position: sticky;">
|
||||
<input type="text" id="search" placeholder="search any fruit you want"
|
||||
oninput="searchDB()">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var existence = document.getElementById("search_window");
|
||||
if (!existence) {
|
||||
// Create the iframe and add it to the overlay div
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.setAttribute("src", "./search_item.php");
|
||||
iframe.id = "search_window";
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
function searchDB(){
|
||||
var text = document.getElementById("search").value;
|
||||
iframe.setAttribute("src", './search_item.php?text=' + text);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user