```
function checkNullSearch(e) {
    if ($('#searchInput').val() === "") {
        $('#searchInput').attr("value", "null");
    }
}

```

script.js

```
<form role="form" id="form-arya">
    <div class="form-group">
        <div class="panel panel-primary searchPanel">
            <div class="input col-sm-12">
                <input type="text" class="form-control" id="searchInput"
                       name="searchInput"
                       aria-describedby="Not Null"
                       placeholder="Search"
                       required>                    
            </div>
            <div class="inputAndButtons">
                <div class="standartSearch">
                    <button class="btn btn-arya btn-success" type="submit" name="ara"
                            value="standart">
                        <i class="glyphicon glyphicon-search" aria-hidden="true" onclick="checkNullSearch(this)"></i>
                        Search
                    </button>
                </div>
            </div>
        </div>
    </div>
</form>

```

xxx.html

Sometimes it works, sometimes it doesn't work
I want to on the input control to do. I want return "null" if input is empty value's