Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="search" role="search">
- @using (Html.BeginForm("AdvancedSearch", "Search", FormMethod.Get, new { id = "SearchForm" }))
- {
- <input id="searchText" name="searchText" placeholder="Search the database…" type="text" autocomplete="on" />
- <div id="search-results" style="display:none">
- @*This is where I am having trouble getting the value for search Text*@
- @Html.Action("AutocompleteSuggestions", "Search", new { searchText = SearchForm.find('input[name="textboxList"]').val());}
- <hr />
- <a id="results-all" onclick='javascript:getAdvancedSearchUrl();'>
- SEE ALL RESULTS
- </a>
- <script type="text/javascript">
- function getAdvancedSearchUrl() {
- var searchTextValue = document.getElementById('searchText').value;
- var url = '@Url.Action("AdvancedSearch", "Search")?searchText=' + searchTextValue;
- $.post(url);
- }
- </script>
- </div>
- <input type="hidden" value="Search" />
- }
- <div style="clear:both"></div>
- </div>
Add Comment
Please, Sign In to add comment