The video web script, that I’m using, has a search-field where if you enter a letter, for example ‘c’, several choices on a list drops-down to select from. If you choose one of those ‘titles’ you’re redirected to the ‘watch’ page, but if you don’t choose one, and just hit ‘return’, you are redirected to the ‘search results’ page, where you can select which ‘title’ to choose. I’d like assistance with getting every search-field search to redirect to the ‘search results’ page, not the ‘watch’ page. I’m not sure if this is a php or html issue. Here are some lines of code that may be related to this issue:
[CODE]
if ($pt->config->total_videos > 1000000) {
$get_videos = $db->where(“MATCH (title) AGAINST (‘$keyword’) AND privacy = 0 “.$category.$date)->orderBy(‘id’, ‘ASC’)->objectbuilder()->paginate(T_VIDEOS, $pt->page_number);
$pt->total_pages = $db->totalPages;
} else {
$get_videos = $db->where(“title LIKE ‘%$keyword%’ AND privacy = 0 “.$category.$date)->orderBy(‘id’, ‘ASC’)->objectbuilder()->paginate(T_VIDEOS, $pt->page_number);
$pt->total_pages = $db->totalPages;
and here’s some related javascript:
[CODE]
<script>
$(‘.search-icon’).on(‘click’, function(event) {
event.preventDefault();
$(‘.search-bar’).toggleClass(‘hidden’);
});
$(‘#search-bar’).keyup(function(event) {
var search_value = $(this).val();
var search_dropdown = $(‘.search-dropdown’);
if (search_value == ”) {
search_dropdown.addClass(‘hidden’);
search_dropdown.empty();
return false;
} else {
search_dropdown.removeClass(‘hidden’);
}
$.post(‘{{LINK aj/search}}’, {search_value: search_value}, function(data, textStatus, xhr) {
if (data.status == 200) {
search_dropdown.html(data.html);
} else {
search_dropdown.addClass(‘hidden’);
search_dropdown.empty();
return false;
}
});
});
</script>
any assistance is appreciated