[SOLVED] change "equals" to "between" for certain |
7/4/2011 08:37:03 | |
| PHPRunner General questions | ||
|
Goodday, |
||
|
C
|
cgphp 7/4/2011 |
|
In the Javascript OnLoad page event of the list page: var field = "your_field_name"; |
|
|
|
jclabuschagne author 7/5/2011 |
|
Hallo Cristian, pageObj.searchController.showSearchOptions();//to show the search panel by default
|
|
|
C
|
cgphp 7/5/2011 |
|
Hallo Cristian, I have the following code in my javascript onload event of the list page: pageObj.searchController.showSearchOptions();//to show the search panel by default
|
|
|
|
jclabuschagne author 7/5/2011 |
|
Cristian, var field = "Field1";
|
|
|
C
|
cgphp 7/5/2011 |
|
When I tested it, it shows "Between" as default on the Options Dropdown of the search field, but just one textbox, and if I select something else like "Contains" and go back to "Between", then it is correctly displaying two textboxes. Something missing? Thanks for your help
|
|
|
|
jclabuschagne author 7/5/2011 |
|
Try this new code:
field = new Array("Mileage","Year","Price");
|
|
|
C
|
cgphp 7/5/2011 |
|
but for some reason still there is just one textbox displayed for each of the fields.
|
|
|
|
jclabuschagne author 7/5/2011 |
|
??? Could you post a screenshot or a demo ?
|
|
|
C
|
cgphp 7/5/2011 |
field = new Array("Mileage","Year","Price"); |
|
|
|
jclabuschagne author 7/5/2011 |
field = new Array("Mileage","Year","Price");
|
|
|
|
Osteele 7/5/2011 |
|
Hello. I like what you have done with your site. May I make a suggestion. When choosing car make for example, it would be nice if the model field could auto-populate with available models. In a popup window I suppose. I had seen this done elsewhere, but for the life of me I cannot remember where. As a matter of fact, I may have had the code a while back, but cannot remember what pc I had it running on. Sorry |
|
|
|
jclabuschagne author 7/6/2011 |
|
Hello. I like what you have done with your site. May I make a suggestion. When choosing car make for example, it would be nice if the model field could auto-populate with available models. In a popup window I suppose. I had seen this done elsewhere, but for the life of me I cannot remember where. As a matter of fact, I may have had the code a while back, but cannot remember what pc I had it running on. Sorry Good luck!
|
|
|
C
|
cgphp 7/6/2011 |
|
Thanks Cristian, that worked perfectly, everything is fine now. Sorry to be a bother, but how can I add custom text to the search panel? What I want to do is: Instead of having just two textboxes, have it in the format: Mileage and [textbox] this is just to make it easier for the user to understand what to do.(also, I am hiding the options fields, so the user wouldn't understand why there is two textboxes) The textboxes can stay as is(it works perfectly, thanks), just the extra text is needed. Must I edit the _search_panel.php manually?
|
|
|
|
jclabuschagne author 7/11/2011 |
|
With jquery you can hide the dropdown and append a custom text before and after the first textbox.
$("input[id*='value'][id*='" + field[i] +"'] ).prepend("Between ");//a modified version of your code above
$(".value_Year_12" ).prepend("Between "); // the id of the input is value_Year_12
|
|
|
C
|
cgphp 7/11/2011 |
|
We can remove the filter array: field = new Array("Mileage","Year","Price"); |
|
|
|
jclabuschagne author 7/12/2011 |
|
Thanks Cristian, it looks great now. |
|
|
C
|
choanhemnhe 8/3/2011 |
|
In the Javascript OnLoad page event of the list page: var field = "your_field_name";
|
|
|
A
|
aramuni 8/6/2011 |
|
Very nice and usefull Cristian. Thank you. |
|
|
C
|
cgphp 8/7/2011 |
|
Please, post your code. |
|