View Single Post
Old 11-06-2005, 12:49 PM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Maybe your ad program takes time to find and display the ads based on query string, so that might account for the extra time. If you are going to use GET instead of POST, use the following instead:
Code:
action='$result_page' method='get'
However, if you want to use POST so that only query string shows in the address bar, the following will be one search behind without some sort of redirect.
Code:
action='$result_page?query_string='".urlencode(stripslashes($query_string))." method='post'
To remedy the one search behind issue with POST, use the following:
Code:
action='$result_page' method='post'
And in your template add:
Code:
<script language="javascript">
<!--
function actionModifier() {
	var qstring = document.forms[0].elements[4].value;
	qstring = qstring.replace(" ","+");
	document.forms[0].action += "?query_string=" + escape(qstring);
}
// -->
</script>
After the following:
Code:
<phpdig:js_for_clicks/>
And in function_phpdig_form.php find:
Code:
$result['form_button'] = "<input type='submit' class='phpdiginputsubmit' name='search' value='".phpdigMsg('go')."'/>";
And replace with:
Code:
$result['form_button'] = "<input type='submit' class='phpdiginputsubmit' name='search' onclick='javascript: actionModifier();' value='".phpdigMsg('go')."'/>";
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote