Assume there is an application, it has a master search bar that searches the inputted text through all the pages and displays the matching resulting pages.
I want to know what logic would you write to implement this?
Can you just give me an idea about it?
I normally code the search controls in a separate form of their own, attached to their own code. That way I can re-use it independently on different pages.
It's good to note also that although web browsers are annoyingly "mousey" there is a standard of sorts for certain shortcut keys and one of them is for a search function. So it's nice to have the HTML coded to use it.
Almost forgot to mention: You CANNOT nest HTML forms, so if you code an independent search form (formlet), it cannot be included in the main form or it will not work. A side-effect of this is that since only data attached to the form being submitted is sent to the host, whatever data was in the other form(s) on the page is unaffected.
Being persecuted doesn't in any way prove your righteousness or your beliefs. Many people get persecuted because they are repugnant or annoying. Or just because they can be.
Arun Singh Raaj
posted 1 year ago
Actually I want to know the "logic" for search operation.