Hiding the search box for a specific page

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/22/2008 3:35:11 PM
Gravatar
Total Posts 9

Hiding the search box for a specific page

Recently I started working on extending MojoPortal by adding some custom pages too it.  Everything is working well now, and correctly within the framework.

I have one issue though.  I have a page which does a search in a database outside of mojoportal.  For this i have a simple form with a text box and a button on it, and the button populates a datagrid with results.  Easy as pie..

Anyway, I am running into a conflict with the site search button in the upper right hand corner.  if a user presses 'enter' after doing a search instead of using the mouse to click the 'go' button that I included, they will be taken to the site search page.  This is obviously confusing to them.

I was wondering if there is a way to disable the site search box and button, but only on the one page and not for the whole site?  If I could do this then (i am hoping) my users can click enter to as they would expect to do normally.

Thank you for your time,

Tony

 

 

7/22/2008 4:02:35 PM
Gravatar
Total Posts 18439

Re: Hiding the search box for a specific page

Hi Tony,

What you need to do is wrap your custom stuff in an <asp:Panel and set the DefaultButton property on your panel to the id of your "Go" button.

Then if the cursor is anywhere within your panel the enter key will result in your button being clicked instead of the mojoportal search button.

Alternatively if you can set a custom layout.master for your custom page that doesn't include the SearchInput control. Or set the linkonly property on the SearchInput to true and it will only display a link to the search page.

Hope it helps,

Joe

7/23/2008 7:48:22 AM
Gravatar
Total Posts 9

Re: Hiding the search box for a specific page

 

Thank you for the help!  The panel solution worked exactly as I wanted.

 

Tony

 

 

You must sign in to post in the forums. This thread is closed to new posts.