I have a select menu where users can filter jobs. I wanted to add a "list all" option, that should just redirect them to the index page, because that lists everything. But I can't do that because I'm using
onchange="form.submit()"
and this is the result I get if I put "index.php" in the value like this:
<option value="index.php">list all</option>
mypage/index.php?slct=index.php
but I should get this:
mypage/index.php
Tried to leave the value empty, but that doesn't work on live server:
index.php?slct=
How should I do this? I'm using select2 js and the <a href>
doesn't work with that.