Generating a searching engine for documents

Hi there,

I am facing some troubles generating a search form that allows visitors on my website to search for documents satisfying their preferences. The page I want the searching to appear on is https://rpunder.wixsite.com/mysite-1/examenopgaven-zoeken. Since I am actually rebuilding my website in wix, having a look at http://wiskundepagina.nl/eindexamens/ will give an impression of what I want. The right searching engine is the one it is all going about right now. As can be seen, I want visitors to be able to select a level (niveau), a course (vak) and a topic (onderwerp) to find all relevant documents. The way I want to do so is by generating a database (“Examenopgaven”), from which I attached a screenshot. As can be seen, the documents displayed should satisfy the selected level (niveau), a course (vak) and a topic (onderwerp) (no data yet for the last one).

To display the results (just showing the relevant documents will be sufficient), I generated a dynamic page. I selected this page to go to when pressing search (zoeken), however when doing so one ends up with a 404 error page. The code I used to get where I want is:

"// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixData from ‘wix-data’;
export function button1_click(event, $w) {
// Runs a query on the “Members” collection
wixData.query(‘Examenopgaven’)
// Query the collection for any items whose “Name” field contains
// the value the user entered in the input element
.contains(‘Niveau’, $w(‘#dropdown1’).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(‘#table1’).rows = res.items;
});
}

$w.onReady( function () {
$w(“#table1”).columns = [{
“id”: “col1”,
“dataPath”: “Document”,
“label”: “Opgave”,
“width”: 100,
“visible”: true ,
“type”: “string”,
}];
});"

Can anyone please help me out?

Kind regards,

Stan Thijssen