Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - simple search funtion
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

simple search funtion

 Post Reply Post Reply
Author
odang View Drop Down
Newbie
Newbie


Joined: 02 April 2006
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote odang Quote  Post ReplyReply Direct Link To This Post Topic: simple search funtion
    Posted: 11 August 2006 at 11:14pm
I would like to have a single search field that searches the entire forum integrated at the top of every page of my site including the pages that are not part of the forum.
 
I currently have it posting to:
search_results_posts.asp?SearchID=[I generate this in the same format as the forum does]&KW=[this is the search term]
 
But I still get:
Either the search has expired or you do not have permission to run this search. Create New Search
What do I need to do to get that to work?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2006 at 11:23pm
The search form in the forum is submitted to a page called 'search_process.asp' which does all the hard work of pressing the search, once the search is complete and stored in the web servers memory only then are you passed to the search_results_posts.asp page.

Have a look at the search_form.asp page as you will need to create many of the fields within the form as hidden fields for the search process to work.
Back to Top
odang View Drop Down
Newbie
Newbie


Joined: 02 April 2006
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote odang Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2006 at 12:41am
cool, thanks
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2006 at 1:32am

Quote

<div class="entry">
<script  language="JavaScript">
//Function to check form is filled in correctly before submitting
function CheckForm () {

 var formArea = document.getElementById('frmSearch');

 //Check for a somthing to search for
 if ((formArea.KW.value=="") && (formArea.USR.value=="")){

  msg = "<% = strTxtErrorDisplayLine %>\n\n";
  msg += "<% = strTxtErrorDisplayLine1 %>\n";
  msg += "<% = strTxtErrorDisplayLine2 %>\n";
  msg += "<% = strTxtErrorDisplayLine %>\n\n";
  msg += "<% = strTxtErrorDisplayLine3 %>\n";

  alert(msg + "\n\t<% = strTxtSearchFormError %>\n\n");
  formArea.KW.focus();
  return false;
 } 
 
 //Disable submit button
 document.getElementById('Submit').disabled=true;

 //Show progress bar
 var progressWin = document.getElementById('progressBar');
 var progressArea = document.getElementById('progressFormArea');
 progressWin.style.left = progressArea.offsetLeft + (progressArea.offsetWidth-210)/2 + 'px';
 progressWin.style.top = progressArea.offsetTop + (progressArea.offsetHeight-140)/2 + 'px';
 progressWin.style.display='inline'
 return true;
}
</script>
<iframe width="200" height="110" id="progressBar" src="/worklife/includes/progress_bar.asp" style="display:none; position:absolute; left:0px; top:0px;" frameborder="0" scrolling="no"></iframe>
<div id="progressFormArea">
<form method="post" name="frmSearch" id="frmSearch" action="/worklife/search_process.asp<% = strQsSID1 %>" onSubmit="return CheckForm();" onReset="return confirm('<% = strResetFormConfirm %>');">
  

 <input name="searchType" id="searchType" type="hidden" value="anyWords">
     <input name="USR" id="USR" type="hidden" value="" maxlength="20" />
   <input name="forumID" id="forumID" size="13" multiple="multiple" type="hidden" value="0">
      <input name="searchIn" id="searchIn" value="body" type="hidden">
    <input name="AGE" id="AGE" type="hidden" value="0">
       <input name="OrderBy" id="OrderBy" value="LastPost" type="hidden">
       <input name="resultType" id="resultType" value="posts" type="hidden">
   <input name="KW" id="KW" type="text" value="" size="15" maxlength="35" />
      <input type="submit" name="Submit" id="Submit" value="Search" />
 
</form>
</div>
</div>
This is something I created that appears to work for me. Smile
 
You may want to change some of the settings if you don't like the default settings I made.
 
...
 
Borg,
 
It would be nice if there was an option to search both the title and the message,
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.