Print Page | Close Window

simple search funtion

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20998
Printed Date: 09 April 2026 at 1:16am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: simple search funtion
Posted By: odang
Subject: simple search funtion
Date 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. http://www.sierrasnowboard.com/forum/search_form.asp?KW=search - Create New Search
What do I need to do to get that to work?



Replies:
Posted By: WebWiz-Bruce
Date 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.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: odang
Date Posted: 12 August 2006 at 12:41am
cool, thanks


Posted By: wistex
Date 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,
 


-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net