I am trying to concatenate the value of the input element into a string in jquery
I am having trouble concatenate the value of the input element to the end of the string.
Using just companyString or #companyString etc is not working
Below is my code
$('#search').click(function() {
$.getJSON('example.php?ol=searchname&name=' + '#companyString'});
Below is my html
Name: <input type="text" id="companyString" value=" ">
<button type="button" id="search">Search</button>