This topic is locked

Filter button

5/10/2010 4:41:21 PM
PHPRunner General questions
T
Tempus_Erus author

Hi,
Does anyone know of a way using a button to perform a filter function?
Any help appreciated.
Thanks.
TE

T
Tempus_Erus author 5/13/2010



In which one you want to use this filter function? please be some more clearer about the question..


I have an authorization system and would like to filter authorized not authorized etc .

A
ann 5/14/2010

Hi,
to create a button which performs filter use custom event (Insert ASP code snippet option on the Visual Editor tab). Here is a sample code:

SearchValue="123"

Set rstmp = server.CreateObject("ADODB.Recordset")

strSQL = "select FieldName from TableName"

rstmp.open strSQL,dbConnection

while not rstmp.eof

str = "<input type=button class=button value=Filter onclick=""window.location.href='TableName_list.php?ctlSearchFor=" & SearchValue & "&srchOptShowStatus=1&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&type1=&value11=" & SearchValue & "&field1=FieldName&option1=Contains&not1=a=search&value=1';"">"

rstmp.movenext
wend

Response.Write str


Here we searching for all records which contains "123" in FieldName.

T
Tempus_Erus author 5/14/2010



Hi,
to create a button which performs filter use custom event (Insert ASP code snippet option on the Visual Editor tab). Here is a sample code:

SearchValue="123"

Set rstmp = server.CreateObject("ADODB.Recordset")

strSQL = "select FieldName from TableName"

rstmp.open strSQL,dbConnection

while not rstmp.eof

str = "<input type=button class=button value=Filter onclick=""window.location.href='TableName_list.php?ctlSearchFor=" & SearchValue & "&srchOptShowStatus=1&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&type1=&value11=" & SearchValue & "&field1=FieldName&option1=Contains&not1=a=search&value=1';"">"

rstmp.movenext
wend

Response.Write str


Here we searching for all records which contains "123" in FieldName.


Thanks.
In my errant way I should have mentioned PHP!

However, thanks for this.
Ady

A
ann 5/17/2010

Hi,
to create filter button in PHP use this code:

$SearchValue="123";
global $conn;

$strSQL = "select FieldName from TableName";

$rs = db_query($strSQL,$conn);

while ($data = db_fetch_array($rs))

$str = "<input type=button class=button value=Filter onclick=\"window.location.href='TableName_list.php?ctlSearchFor=".$SearchValue.

"&srchOptShowStatus=1&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&type1=&value11=".

$SearchValue."&field1=FieldName&option1=Contains&not1=a=search&value=1';\">";

echo $str;
T
Tempus_Erus author 5/18/2010



Hi,
to create filter button in PHP use this code:

$SearchValue="123";
global $conn;

$strSQL = "select FieldName from TableName";

$rs = db_query($strSQL,$conn);

while ($data = db_fetch_array($rs))

$str = "<input type=button class=button value=Filter onclick=\"window.location.href='TableName_list.php?ctlSearchFor=".$SearchValue.

"&srchOptShowStatus=1&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&type1=&value11=".

$SearchValue."&field1=FieldName&option1=Contains&not1=a=search&value=1';\">";

echo $str;



Superb. Many thanks I will give this a go.