Hi, how could I send a search parameter from another html page?
I have GeoPortal running at http://localhost:8080/geoportal-server-catalog-2.7.1.1/#homePanel.
Additionally, I have another web page in which I have a textbox where the user can add a text which must be searched in the metadata that already exists in the geoportal, specifically in the catalog.
-----------------------------------------
this is my html code for the another page..
<section class="search-bar">
<form id="searchForm" action="http://localhost:8080/geoportal-server-catalog-2.7.1.1/#searchPanel" method="get">
<input type="text" id="searchInput" placeholder="Search...">
</form>
</section>
this is javascript code...
require(["dojo/ready"], function(ready) {
ready(function() {
// Code to handle search on main page
var searchForm = document.getElementById('searchForm');
if (searchForm) {
searchForm.addEventListener('submit', function(event) {
event.preventDefault();
var query = document.getElementById('searchInput').value;
if (query) {
window.location.href = 'http://localhost:8080/geoportal-server-catalog-2.7.1.1/#searchPanel?query=' + encodeURIComponent(query);
}
});}});});
This works correctly, since when you redirect the page to the catalog, it loads without problems.
When starting the catalog page, how can I read the redirect parameters?