Here is the HTML code I am working with:
<form id="search-new">
<input type="text" name="search" placeholder="Search on the Site" value="">
<input id="search-submit" type="button" value="›">
</form>
Now, let's take a look at my jQuery script:
<script type="text/javascript">
$(document).ready(function(){
$('#search-new').submit(function(e) {
e.preventDefault();
//edited
window.open = ('http://www.psicotropicus.org/'+'/search'+encodeURIComponent($('#search-submit').val()), '_blank');
return false;
});
});
</script>
The idea behind this is that upon clicking submit, the JavaScript/jQuery will fetch the value of #search-submit and append it to the URL before redirecting the user.
Still facing an issue with _blank not functioning correctly.
Thank you for any help in advance.