This topic is locked

More specific control over AJAX use

4/25/2008 9:06:12 AM
PHPRunner General questions
G
grh author

I want to use AJAX with my application, however I have one specific query that is a bit long and I do not want the search window to use AJAX on this specific page.
I created an event, "List Page before display"
[codebox]//** Custom code ****

// put your custom code here
$useAJAX = false;

$suggestAllContent = false;[/codebox]
However, this is not working....

  1. how could I accomplish this?
  2. how could I change the search box to default to a specific search, rather than search all fields that contains _____?
    Thanks

    Greg

J
Jane 4/28/2008

Gregory,
to turn off Ajax on one of your page add your code to the generated files directly.
Regarding the second question.

To change default empty search parameter to your custom text use List page: Before display event.

Here is a sample code:

if ($_REQUEST["a"]!="search" && $_REQUEST["a"]!="advsearch" && $_REQUEST["a"]!="showall")

$smarty->assign("search_searchfor","value=\"your value\"");