This topic is locked

Modifying the appearance of the search panel

11/23/2011 3:55:23 PM
PHPRunner General questions
G
giorgiots author

Hi everyone,
I don't know if it has been asked before but after searching the forum I can't find anything relative.
This is what I'm trying to do. When a user uses the search panel and chooses the "Between" or "Not between" option let's say for a date field, I would like the words "From" and "To" to appear before the 2 datepickers.
Can anubody give me a hint how to achieve that?
Thanks
Giorgio

G
giorgiots author 11/24/2011

Christian,
first if all thank you for the reply.
I've tried the following code :

pageObj.searchController.showSearchOptions();

field = new Array("INITIAL_SWON");

for(var i = 0; i < field.length; i++)

{

$("select[id='srchOpt'][id='" + field*+"'] option[value='Between").attr("selected", "selected").parents().eq(0).trigger("change").hide();

$("input[id^='value
"+field[i]+"'][type='text']").before("Between<br/>").after("<br/>and<br/>");

}


As I can understand it it should add the words "Before" and "And" when the option filter in set to "Between". But in my case they are showing no matter what search option I've sellected.

Also each time the filter is applied, the words are multiplying in the panel, fow example the secod time I aply the filer I can see two "Between" and two "And".

These happens when the field is seto to text.
When I set the field to date with datepicker there is one more problem in the layout of the panel.

Instead of [i]"Between" "1st Text field" "1st calender link" - "And" "2nd Text field" "2nd calender link" I get "Between" "1st Text field" "And" "1st calender link" "2nd Text field" "2nd calender link"*.
Is there a way to fix these issues?
Thanks and sorry to bother but my jscript in not that good.
Giorgio