I need to hide the smallsearchbox until the page loads. Is there a way to inject a java script function into the process so that once the pages loads the box becomes visible?
Actually, you neither need to go the long route of creating a replacement smallsearchbox DelegateControl, nor do you need to change the HTML body of your masterpage as mentioned in other answers.
All you need is the following CSS:
which will hide the searchbox from the UI.
The quick & dirty way to implement the above CSS & script code is to put it inside the
The clean and reusable way is to develop a custom SharePoint DelegateControl as a feature and staple it on the placeholder "AdditionalPageHead", like described here:
The "AdditionalPageHead" approach has the added advantage that you can turn it off and on simply by flipping the feature on/off and it can be applied to any masterpage on any site.
If you want to do it for all the pages/sites then remove the
When SharePoint renders the page it definitely needs some contentplaceholders although you don't use it. The best way is to make them invisible.