BV Commerce Forum
»
BV Commerce Support
»
General Support
»
Integrating bv keyword search into own design
Rank: Member
Joined: 2/25/2008(UTC) Posts: 111
|
I have a most likely a stupid question. I want to integrate the keyword search function only that bv created into my owm text box that is in the header. I have tried several things but they do not work. I keep getting a runtime error or nothing comes up. I am including a screen shot. The text box I am referring to is at the top where it says search vitamins and the image button to the right for a submit search. Is there an easy way to do this? File Attachment(s): screenshot.JPG (2,215kb) downloaded 78 time(s).You cannot view/download attachments. Try to login or register.
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
The easiest way would probably be to add a content column to your header control (use default.aspx as a reference), add a search box, and style it within the context of #header.
I personally usually do this with a custom control in the theme. But either way works. |
|
|
|
|
Rank: Member
Joined: 2/25/2008(UTC) Posts: 111
|
By a custom control in the theme, what do you mean? Is there a control in admin that can do this?
|
|
|
|
Rank: Member
Joined: 2/25/2008(UTC) Posts: 111
|
this is my code, what am I missing? <form name="searchboxform" method="post" action="/search.aspx" id="aspnetForm"> <!--<a id="ctl00_MainContent_lnkSearch" title="Search" class="searchLnk" href="Search.aspx">Search</a>--> <div id="Anthem_ctl00_MainContentHolder_MessageBox1_pnlMain__"></div> <div class="searchboxform"> <h4><span><label for="ctl00$MainContentHolder$SearchCriteria1$KeywordField" id="ctl00_MainContentHolder_KeywordField_SearchCriteria1_lblTitle">Search</label></span></h4> <div id="ctl00_MainContentHolder_SearchCriteria1_pnlMain" > <span class="searchspan"> <input name="ctl00$MainContentHolder$SearchCriteria1$KeywordField" type="text" size="20" id="ctl00_MainContentHolder_SearchCriteria1_KeywordField" class="forminput" /> <input type="image" name="ctl00$MainContentHolder$SearchCriteria1$btnSearch" id="ctl00_MainContentHolder_SearchCriteria1_btnSearch" src="/BVModules/Themes/Bvc5/images/buttons/GoSearch.png" onKeyPress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_MainContentHolder_SearchCriteria1_btnSearch');" style="border-width:0px;" /> </span> </div> </div> </form>
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
You can't use HTML or add a form to ASP.Net sites, if that's what you're doing. All pages are wrapped in a form and you can't insert one form inside another.
Yes, you can (1) insert a Content Column (Content > Columns) into your header and add a search box module to it via the admin. Or (2) build a custom control for your theme, which is a .ascx .Net control containing your search code and referenced in your header.
Option 1 would probably be easier for you, as long as you understand the cascading nature of CSS to style it specifically. |
|
|
|
|
Rank: Member
Joined: 2/25/2008(UTC) Posts: 111
|
|
|
|
|
Rank: Member
Joined: 7/23/2008(UTC) Posts: 1
|
Hi emunah,
My site design requires the same positioning of the search box right under the horizontal menu within the header and I am glad that you were able to figure it out, I would appreciate if you can share your technique.
Thanks
AGM
|
|
|
|
Rank: Member
Joined: 1/20/2008(UTC) Posts: 47
|
Just a follow-up to this post:
Cliff, I used the admin area to create a new Content Column, but can you explain how this gets inserted into the Header file? I assume some code goes at the top of the file in addition to the control in the code, but can you share syntax? |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.