This topic is locked

How to get the URL of advanced search results page

7/5/2007 7:56:02 PM
PHPRunner Tips and Tricks
Sergey Kornilov admin

PHPRunner 4.2:
Proceed to the Visual Editor and open the advanced search page.

Switch to HTML mode and find the following code snippet:

<form method="POST" action="TableName_list.php" name="editform">


and replace it with:

<form method="GET" action="TableName_list.php" name="editform">


Build the project and run advanced search. Copy and paste the URL into your code.
PHPRunner 5.0/5.1:
Build the project and open generated <table_name>_search.php file.
Find the following code snippet:

$contents_block["begin"]="<form method=\"POST\" ";


and replace it with:

$contents_block["begin"]="<form method=\"GET\" ";


Run the search and copy the URL.

N
nicolagrimshaw 10/31/2008

Proceed to the Visual Editor and open the advanced search page.

Switch to HTML mode and find the following code snippet:
and replace it with:
Build the project and run advanced search. Copy and paste the URL into your code.


Does this apply to 5.0? I'm sure I managed to get it working on a previous version, but I am unable to now!

Sergey Kornilov admin 11/5/2008

Should work the same way in all versions. What's happening when you make this change in version 5.0?

N
nicolagrimshaw 11/12/2008

Should work the same way in all versions. What's happening when you make this change in version 5.0?


I've not been able to make the changes - the problem is I can't find the relevant code in 5.0!

Sergey Kornilov admin 11/12/2008

I've posted an update related to version 5.0.

S
shep 10/22/2012

Sorry to bump an old thread, but how do I do this with PHPRunner 6.1 or, especially, 6.2? I need to do this in my project but I also don't see the specified text in the html.
To be clear, I don't really need the results of user supplied advanced search, but instead want to jump to a specific record on a list page via a href link defined on a different page. I could construct this href in a custom view. Like this (this is a function called by the custom view code in several places; $mac=a key in current list, $text=what to display for link):



function LinkToServers($mac,$text)

{

global $sys_dbname;

$pageBase = $sys_dbname;

$mastersPage = "Servers_list.php";

$prefix = "<a href=\"http://".$_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT";];

$prefix .= "/" . $pageBase . "/" . $mastersPage . "?a=integrated&ctlSearchFor=";

$prefix .= $mac;

$prefix .= "&simpleSrchFieldsComboOpt=&simpleSrchTypeComboNot=&simpleSrchTypeComboOpt=&criteria=and";

$prefix .= "\">";

return $prefix . $text . "</a>";

}


I arrived at that string via a cut and paste of the URL from the browser as provided to a list search. It works sort of okay in 6.1 but not at all in 6.2.

Sergey Kornilov admin 10/22/2012

In version 6.2 it's much more simpler than that. Just copy the search results page URL right from browser's address line.

S
shep 10/22/2012



In version 6.2 it's much more simpler than that. Just copy the search results page URL right from browser's address line.


Fantastic. That works much better than in 6.1. Excellent work, thanks.