[Weberp-svn] SF.net SVN: weberp:[9408] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-07-11 08:31:34
|
Revision: 9408 http://weberp.svn.sourceforge.net/weberp/?rev=9408&view=rev Author: tim_schofield Date: 2012-07-11 08:31:28 +0000 (Wed, 11 Jul 2012) Log Message: ----------- Improvements to customer search code Modified Paths: -------------- trunk/includes/CustomerSearch.php trunk/includes/MiscFunctions.php trunk/javascripts/FormFunctions.js Modified: trunk/includes/CustomerSearch.php =================================================================== --- trunk/includes/CustomerSearch.php 2012-07-11 08:31:16 UTC (rev 9407) +++ trunk/includes/CustomerSearch.php 2012-07-11 08:31:28 UTC (rev 9408) @@ -64,7 +64,7 @@ echo '<td class="background_td" width="66%" id="SearchResults">'; } -echo '<form onkeyup="return SubmitForm(this);" name="SearchForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<form onkeyup="return SubmitSearchForm(this);" name="SearchForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table style="border: solid #000000 1px;width:100%;border-radius: 5px;"> Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2012-07-11 08:31:16 UTC (rev 9407) +++ trunk/includes/MiscFunctions.php 2012-07-11 08:31:28 UTC (rev 9408) @@ -326,12 +326,14 @@ return false; } -function InternalLink($rootpath, $Script, $Caption, $Class='') { +function InternalLink($rootpath, $Script, $Caption, $Class='', $Title='') { + if ($Title=='') { + $Title = $Caption; + } $PathArray = explode('?', $Script); -// $ScriptNameArray = explode('/', substr($PathArray[0],1)); $PageSecurity = $_SESSION['PageSecurityArray'][$PathArray[0]]; if ((in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { - return '<a class="' . $Class . '" onclick="return OpenSubWindow(\'' . $Script.'\')" href="" title="' . $Caption . '">' . $Caption . '</a>'; + return '<a class="' . $Class . '" onclick="return OpenSubWindow(\'' . $Script.'\')" href="" title="' . $Title . '">' . $Caption . '</a>'; } } Modified: trunk/javascripts/FormFunctions.js =================================================================== --- trunk/javascripts/FormFunctions.js 2012-07-11 08:31:16 UTC (rev 9407) +++ trunk/javascripts/FormFunctions.js 2012-07-11 08:31:28 UTC (rev 9408) @@ -55,7 +55,7 @@ function SubmitForm(FormName, Target='') { if (Target=='') { - var Target=FormName.action; + Target=FormName.action; } var PostData=''; for(var i=0,fLen=FormName.length;i<fLen;i++){ @@ -76,7 +76,6 @@ xmlhttp.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate"); xmlhttp.setRequestHeader("Pragma","no-cache"); xmlhttp.send(PostData); - CloseSearchWindow(); return false; } @@ -100,9 +99,8 @@ } xmlhttp.open("POST",Target,true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); - xmlhttp.setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate"); - xmlhttp.setRequestHeader("Pragma","no-cache"); xmlhttp.send(PostData); +// CloseSearchWindow(); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |