This topic is locked
[SOLVED]

 Search Panel show/hide intitial state

8/24/2010 11:37:46 AM
PHPRunner General questions
I
itmann author

Hello Forum,
i wonder if there's a way to set the initial state of the Search Panel to "SHOW". so the user does not have to click the button. the reason is, some users dont unserstand the sympol or they dont know how to deal with it. so i'd like to set some search option in advance and this should be always visible.. please see screenshot
thanks for help

F
FunkDaddy 8/24/2010

You could use Firefox or Chrome inspector to find out what name is given to that button icon by PHPRunner, then simply create you own graphic button icon that would be more noticable to users. I created myown record view, edit, and inline buttons by simplyusing Microsoft Publisher grpahics software and included the words "view", "edit", etc inside those buttons for the same reason: users who can't seem to intuitively figure out how to use forms.
Simply replace the original icon button image with your own customized version. I know this isn't eactly what you are looking for, but it may give you an alternative worth thinking about. By the way... you'll need to replace the files in the PHPRunner directory (and not the output for your project directory) if you want your icon image changes to be permanent every time you rebuild your project.
As for having a default search panel state, I would be willing to bet that there is a sample somewhere in the forums on how to do that. You would simply add to your 'After table initialize" event so it loads your state whenever that page is called.
Best

I
itmann author 8/24/2010

i appreciate your advice, but i'd prefer to handel this issue through an EVENT. any other ideas ??

A
ann 8/25/2010

Itmann,
just check Quick search option for the fields on the Choose fields tab.

J
jsuisman 8/25/2010

itmann,
I had to do something very similar to this before. We're going to use javascript to see if the search panel is hidden, and if it is we're going to toggle it, otherwise we'll just leave it alone.
1 Go to Events tab in phprunner

2 Go to table you want to modify on left, then expand the list page

3 Click List page: JavaScript OnLoad event

4 Put the following code into the event below // put your code here:



if( $('#searchOptions1').is(':hidden') ) {

searchController1.toggleSearchOptions();

}


Repeat for any other pages and build the project.
Let me know if it doesn't work.
Jarred

I
itmann author 8/26/2010

it works perfectly. thanks alot Jarred <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=52150&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

W
waynelson2 9/14/2010

What I want to do is the exact opposite of itmann.
As Ann mentioned - after I selected Quick Search in the Fields Page, the default I get is for the browser to open the list page with the Quick search panel shown.
How do I set the initial state of the Quick Search Panel to Hidden.
Thanks

W
waynelson2 9/14/2010

I figured it out -
Thanks to jsuisman - I used his answer - took a guess and changed hidden to show and it worked!
if( $('#searchOptions1').is(':show') ) {

searchController1.toggleSearchOptions();

}
Thanks all

N
netmedia59 11/4/2010

Hello,
What will be the code if I want to do the opposite

If the search panel is showned, I want to hide it !

Thanks
Olivier

Lille (France)



itmann,
I had to do something very similar to this before. We're going to use javascript to see if the search panel is hidden, and if it is we're going to toggle it, otherwise we'll just leave it alone.
1 Go to Events tab in phprunner

2 Go to table you want to modify on left, then expand the list page

3 Click List page: JavaScript OnLoad event

4 Put the following code into the event below // put your code here:



if( $('#searchOptions1').is(':hidden') ) {

searchController1.toggleSearchOptions();

}


Repeat for any other pages and build the project.
Let me know if it doesn't work.
Jarred

J
jsuisman 11/4/2010

Olivier,
Look at the topic reply before yours from waynelson2. His code should do what you want.
Jarred