![]() |
Sergey Kornilov admin 1/11/2006 |
What page (List, Edit, Search) you talking about? |
E
|
ericjlars author 1/11/2006 |
This would be for the list page |
![]() |
Sergey Kornilov admin 1/12/2006 |
Hi, |
J
|
jose2250 4/18/2008 |
Hi, you can use Advanced Search page to filter records by values selected from dropdown list. Also you can modify PHPRunner-created List page to add a dropdown that will start search by city name. However this task requires some custom programming.
|
J
|
Jane 4/21/2008 |
Answered in your personal email. |
S
|
stevenf 4/21/2008 |
Hi Jane, |
J
|
Jane 4/22/2008 |
Hi, //create dropdown box $str = ""; $str.= "<select onchange=\"window.location.href=this.options[this.selectedIndex].value;\"> <option value=\"\">Please select</option>"; //select values from database global $conn; $strSQL = "select company from tablename"; $rs = db_query($strSQL,$conn); while ($data = db_fetch_array($rs)) $str.="<option value=\"tablename_list.php?a=search&value=1&SearchFor=".$data["company"]."&SearchOption=Contains&SearchField=company\">".$data["company"]."</option>"; </select>"; echo $str; |
S
|
stevenf 4/22/2008 |
Great! |
J
|
jose2250 4/23/2008 |
Hi Jane, Hi, you can do it using custom event (Insert PHP code snippet option on the Visual Editor tab). Here is a sample: |
J
|
jose2250 4/23/2008 |
Did you try this code Steven? Any luck? Great! Thanks a lot <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=28389&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> |
J
|
Jane 4/23/2008 |
Hi, //create dropdown box $str = ""; $str.= "<select onchange=\"window.location.href=this.options[this.selectedIndex].value;\"><option value=\"\">Please select</option>"; //select values from database global $conn; $strSQL = "select company from tablename"; $rs = db_query($strSQL,$conn); while ($data = db_fetch_array($rs)) $str.="<option value=\"tablename_list.php?a=search&value=1&SearchFor=".$data["company"]."&SearchOption=Contains&SearchField=company\">".$data["company"]."</option>"; $str.="</select>"; echo $str; |
J
|
jose2250 4/23/2008 |
Excellent! Hi, sorry for my fault. Here is the correct code: |
J
|
Jane 4/23/2008 |
Jose, |
J
|
jose2250 4/23/2008 |
I will do. Thanks! Jose, you need to contact with this question support team at support@xlinesoft.com. Include your order number or registration email address. |
N
|
nix386 9/9/2008 |
Sorry to resurrect an old thread but I have a need for this code and it seems to work well but I have an issue where the dropdown seems to be populated with duplicate values for the search criteria. //create dropdown box |
J
|
Jane 9/9/2008 |
Hi, ... $strSQL = "select DISTINCT state from master_table"; ... |
N
|
nix386 9/9/2008 |
Doh! Of course, thanks Jane! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=32868&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> Hi, just add DISTINCT clause to your query: |
F
|
fawad112 9/15/2008 |
[codebox]//create dropdown box |
F
|
fawad112 9/15/2008 |
Thanks i did it with other method . |
I
|
illi 9/24/2008 |
Hello, |
J
|
Jepsen 9/24/2008 |
Exactly what I need too. Dependant drop down for each column on the list page would be elegant and extremely usefull. Hello, Your dropdown code is working really well for me...but I too would like to use a dropdown along with a dependent dropdown to filter the list page. Basically, "School" and then "Teacher" within that School. Any guidance? Thanks! Eric |
T
|
thesofa 9/25/2008 |
I remember a couple of years ago this was asked for and a link was published , So I did some digging and found a cut and paste table filter . |
J
|
Jepsen 9/26/2008 |
I remember a couple of years ago this was asked for and a link was published , So I did some digging and found a cut and paste table filter . I have no idea if it works, but it might save some hassle.
|
T
|
thesofa 9/26/2008 |
make an extra copy of it and just play, download the zip file for it and read all the examples, they are truly lovely. |
N
|
nicolagrimshaw 10/1/2008 |
This was elegant I would love to see this as an option in the PHPR list page. Something for the PHPR team to think about. Unfortunately, I am not familiar enough with source programming to implement this on the pages. Tried with no success. The explanation given assumes that you know what you are doing from a start.
|
R
|
runnerPHP2008 4/6/2009 |
I will do. Thanks!
|
![]() |
Sergey Kornilov admin 4/6/2009 |
runnerPHP_2007, |
![]() |
hichem 4/8/2009 |
Thanks i did it with other method .
|