Search code examples
javascriptjqueryhtmlxhtmldhtml

how to work on same search tab on multiple html pages


I have around ten html pages all have search tab ,only one page is dedicated to display the search result , from which ever page i enter search it directs to search page and displays output ,is their any better method to do this? I am using jquery on clientside and webservices written in c# on the server side and i am not using master pages .


Solution

  • if you want to display the result in the current html page then add a div like thath:

    <div id="search-result"></div>
    

    and do an ajax request for the search.html and display the returned string like that:

    $("#search-result").html(resulting_string);