This topic is locked

BETWEEN default in Advanced Search

11/11/2009 7:08:43 PM
PHPRunner General questions
G
gluckett author

Hi All,

I have an "advanced search" in PHPRunner, how do I set the dropdown box to "Between" rather than "Equals" as the default selected date item?
thanks

gordon

Sergey Kornilov admin 11/11/2009

Paste the following to the end of the search page in Visual Editor (HTML mode). Replace text in bold with correct field name (case sensitive).

<script>

function setSelectedIndex(s, v)

{

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

{

if ( s.options[i].text == v )

{

s.options[i].selected = true;

return;

}

}

}

setSelectedIndex(document.editform.asearchopt_fieldname,"Between"); ShowHideControls();

</script>