Originally posted by kutra
View Post
Announcement
Collapse
No announcement yet.
Performing a selective search.
Collapse
X
-
-
Originally posted by wrensoft View PostThe CGI script itself doesn't generate the search_template.html file.
Search.CGI will always use the file search_template.html as the template file. You should add your changes to this file rather than making a new one (which will be ignored).
I cannot see the HTML code in search_template.html where I can add my custom Javascript code.
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++
Basically, this is the JavaScript function and the custom JavaScript code that I am using in my own search page called search_page.html:
...
function unCheckOnlyAll()
{
document.searchForm.zoom_catAll.checked=false;
}
...
...
<form method="get" name ="searchForm" action="search.cgi" class="zoom_searchform">
...
...
Category: <ul>
<li><input type="checkbox" name="zoom_catAll" value="-1" checked="true">All</input></li>
<li><input type="checkbox" name="zoom_cat" value="0" onClick="unCheckOnlyAll()">MSDL (exclude References)</input></li>
<li><input type="checkbox" name="zoom_cat" value="1" onClick="unCheckOnlyAll()">Web SDK Reference</input></li>
<li><input type="checkbox" name="zoom_cat" value="2" onClick="unCheckOnlyAll()">Visualization SDK Reference</input></li>
<li><input type="checkbox" name="zoom_cat" value="3" onClick="unCheckOnlyAll()">Intelligence Server Reference</input></li>
</ul>
...
...
</form>
How do I implement the above logic in search_template.html instead of my own search page called search_page.html? If I open search_template.html, I do not see the HTML for the form.
Regards,
KLast edited by kutra; Jul-08-2008, 10:00 PM.
Leave a comment:
-
to search_template.html (generated by default by CGI search).
Search.CGI will always use the file search_template.html as the template file. You should add your changes to this file rather than making a new one (which will be ignored).
Leave a comment:
-
Thanks for the links, Ray. I was able to implement the JavaScript solution.
I am running into a new issue. I have created my own search page called search_page.html that is almost identical to search_template.html (generated by default by CGI search). The difference is that I used the code to add a search box to my search_page.html from http://www.wrensoft.com/zoom/support...tml#searchform. Everything works great, including Categories.
I modified the heading in search_page.html to say "Search" instead of the default "Search this site". This is correctly displayed when I access search_page.html. However, when the search results are displayed, I believe a different template is used because the heading changes to the default "Search this site". Any idea how to fix this?
Thanks,
K
Leave a comment:
-
Originally posted by kutra View Post1. Is there a way to implement logic such that "All" check box gets unchecked if I check A, B, C or D?
http://www.wrensoft.com/forum/showthread.php?t=1601
Originally posted by kutra View Post2. Is there a way to remember a user's previous category? That is, right now, when I go to the search page ("search.cgi"), the "All" check box is always checked by default. If I unselect it, and run a search by checking "B", then the next time I go to search page ("search.cgi"), "B" should be selected instead of "All".
Leave a comment:
-
Two questions.
Now, I have 5 categories for searching: A, B, C, D and All.
1. Is there a way to implement logic such that "All" check box gets unchecked if I check A, B, C or D?
2. Is there a way to remember a user's previous category? That is, right now, when I go to the search page ("search.cgi"), the "All" check box is always checked by default. If I unselect it, and run a search by checking "B", then the next time I go to search page ("search.cgi"), "B" should be selected instead of "All".
Regards,
KLast edited by kutra; Jul-01-2008, 06:48 PM.
Leave a comment:
-
My mistake that I wasn't clear. I don't mean search within one single page. What I meant was I wanted one search page to offer the different search options and display the search results on that same search page.
"Categories" served my cause perfectly. Yoo hoo!!
Cheers,
K
Leave a comment:
-
The "Categories" feature does spring to mind, and likely do what you want if you setup a category for each individual page. But it is a little unusual to be wanting Zoom to search within one single page.
Leave a comment:
-
Categories?
I believe the "Categories" feature will help me do this. I shall read up on this and post back questions, if any.
Thanks,
K
Leave a comment:
-
Performing a selective search.
I am using the CGI version of ZoomSearch V5 for my Web site. My web site has the following directory structure:
- A, B, C, D and E (these are folders that conatins HTML files and subfolders within them.)
- The "search.cgi" file sucessfully searches for keywords in all files within folders A, B, C, D and E.
I am looking for this customization:
I want to be able to provide an user with options to select folders of their choice for searching from a single search page. For example, a user should be able to search only folders A and E. This should be done by providing check boxes (A through E) to the user who can then selct and unselect before running the search.
The search results should be provided on that single search page.
How do I do this?
Thanks,
KTags: None
Leave a comment: