I installed the XSLTSearch package and it works great. There is only one thing I like to know.
Is it possible to display the search results on a diffent page?
The input textfield and search button are place in a masterpage. When the search criteria is entered and the search button is click I want to redirect the user to the search result page that is showing him the result.
First of all you need to create a form on your master-template (Or on the pages where you want the searchform to be). This form has to have an action="/search.aspx". <--The action should point to the resultpage. In this case the resultpage would be on /search.aspx.
In the form you need an input textfield and a submit-button. When the user clicks the search-button, the form takes he user to /search.aspx, where the result will be shown.
You need to be aware that the input textfield has the correct name. Otherwise the XSLT-search doesn't know where to get the searchstring from. I can't remember the name, but I'm cuite sure that it sould look something like this:
Somehow the user in not redirected to the search.aspx page. My site contains serveral pages all with the same master page. The masterpage contains the search textbox an buttom.
After clicking search, I see that the page is submitted (page refresh) but the visitor is nog redirected to the search.aspx.
Bas, It sounds like you have another form outside the search-form. Is this the case? You need to have the search-form outside any other form, otherwise it could cause so problems.
XSLTSearch
Hi all,
I installed the XSLTSearch package and it works great. There is only one thing I like to know.
Is it possible to display the search results on a diffent page?
The input textfield and search button are place in a masterpage. When the search criteria is entered and the search button is click I want to redirect the user to the search result page that is showing him the result.
Kind regards,
Bas
Yes.
XSLT search uses a http get or post request to get the search field value, I prefer 'get' as it means searches can be bookmarked.
Rich
Hi Bas
Yes you can :)
First of all you need to create a form on your master-template (Or on the pages where you want the searchform to be). This form has to have an action="/search.aspx". <--The action should point to the resultpage. In this case the resultpage would be on /search.aspx.
In the form you need an input textfield and a submit-button. When the user clicks the search-button, the form takes he user to /search.aspx, where the result will be shown.
You need to be aware that the input textfield has the correct name. Otherwise the XSLT-search doesn't know where to get the searchstring from. I can't remember the name, but I'm cuite sure that it sould look something like this:
I hope this makes sense.
/Kim A
Hi Rich,
Somehow the user in not redirected to the search.aspx page. My site contains serveral pages all with the same master page. The masterpage contains the search textbox an buttom.
After clicking search, I see that the page is submitted (page refresh) but the visitor is nog redirected to the search.aspx.
Kind regards
Bas, It sounds like you have another form outside the search-form. Is this the case? You need to have the search-form outside any other form, otherwise it could cause so problems.
And instead of having a:
You could use a submit-button like this:
This will also make sure that user who have disabled javascript, can use the form :)
/Kim A
Kim,
You were right, I had another form in my webpage :-). This solved the issue described above.
Thank's!
Bas
is working on a reply...