Skip to content

Commit c912e0e

Browse files
committed
Set search box to no value after search and also turned off autocomplete on the form so it doesn't sugger past searches
1 parent a108a49 commit c912e0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1>Food and Drinks in Nazareth</h1>
1212
<section>
1313
<div class="search-container">
1414
<form class="form" id="searchForm">
15-
<input type="text" name="searchValue" value="test" placeholder="Search by tags">
15+
<input type="text" name="searchValue" value="" placeholder="Search by tags" autocomplete="off">
1616
<button type="submit" name="searchBtn">SEARCH</button>
1717
</form>
1818
</div>

public/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ searchForm.addEventListener('submit', function(event) {
3333
else {
3434
var url = '/search?'+ value.trim();
3535
requestModule.makeRequest('GET', url ,renderModule.updateDOM)
36-
searchForm.searchValue.value = "Search completed";
36+
searchForm.searchValue.value = null;
3737
}
3838
})

0 commit comments

Comments
 (0)