aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorGravatar Victor Huesca <victor.huesca@bootlin.com>2019-08-26 14:14:05 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-09-25 22:53:32 +0200
commiteb47c216049b44b5c2a48849a0ba53717b929a4a (patch)
treea264e194b2e076e78d8ffdffef31ce485326f98d /web
parent50b09c3fea3d99809b5ad4e1ef5000ee104e29b3 (diff)
downloadbuildroot-test-eb47c216049b44b5c2a48849a0ba53717b929a4a.tar.gz
buildroot-test-eb47c216049b44b5c2a48849a0ba53717b929a4a.tar.bz2
web/search.{js, php}: pass the event to the submit handler
Some web-browsers do not define the global event object on functions callback (see [1]). This cause an 'undefined event' error on the search page. Passing the event argument from the function caller fix this (at least it does on Firefox ESR 60.0.8). [1] http://buildroot-busybox.2317881.n4.nabble.com/New-search-features-on-autobuild-buildroot-org-tt230624.html Signed-off-by: Victor Huesca <victor.huesca@bootlin.com> Acked-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'web')
-rw-r--r--web/search.js2
-rw-r--r--web/search.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/search.js b/web/search.js
index cf52478..d624ade 100644
--- a/web/search.js
+++ b/web/search.js
@@ -1,4 +1,4 @@
-function submitForm() {
+function submitForm(event) {
// Do not send the form
event.preventDefault();
diff --git a/web/search.php b/web/search.php
index bcdd62e..821308f 100644
--- a/web/search.php
+++ b/web/search.php
@@ -7,7 +7,7 @@ bab_header("Buildroot tests - Search page");
<script type='text/javascript' src="search.js"></script>
-<form action="index.php" method="get" onsubmit="submitForm()">
+<form action="index.php" method="get" onsubmit="submitForm(event)">
<label>
<span>Submitter:</span>
<input type="text" name="submitter" placeholder="Submitter">