This topic is locked

Change Default Advanced Search Prameter

4/20/2010 11:00:46 AM
ASPRunnerPro General questions
author

I am using ASPRunner 6.2 Build 5242 on XP workstations and a MS 2003 Web server.
How do I remove the "Not" and the search parameter dropdown in the advanced search and set the search to "Equal" only? I don't want to give users the option for "Like" or any other operator.
Thanks in advance for your input.

Joe

J
Jane 4/23/2010

Joe,
you can hide unnecessary columns adding style="display:none;" to each cell.

Here is just a sample:

<tr valign=center>

<td align=center valign=middle class="searchlist_left">&nbsp;</td>

<td width=30 align=center valign=middle class=searchlist style="display:none;">NOT</td>

<td align=center valign=middle class="searchlist" style="display:none;">&nbsp; </td>

<td align=center valign=middle class="searchlist">&nbsp; </td>

<td align=center valign=middle class="searchlist_right">&nbsp; </td></tr>

{BEGIN FieldName1_fieldblock}

<tr>

<td class=editshade_b style="padding-left:15px;">{$label TableName FieldName1}</td>

<td align=center class=editshade_lb style="padding-left:10px; display:none;"><input type=checkbox {$FieldName1_notbox}></td>
<td class=editshade_lb style="padding-left:10px; display:none;">{$searchtype_FieldName1}</td>

<td width=270 class=editshade_lb style="padding-left:10px;">{$FieldName1_editcontrol}&nbsp;</td>

<td width=270 class=editshade_lb style="padding-left:10px;">{$FieldName1_editcontrol1}&nbsp;</td>

</tr>

{END FieldName1_fieldblock}

...


Then set up search options to Equals manually in the "Search page: JavaScript Onload event" on the Eventstab:

document.getElementById("srchOpt_1_FieldName1").value="Equals";

document.getElementById("srchOpt_1_FieldName2").value="Equals";
A
alexandra 4/26/2010

Could someone suggest what to change if I would like to hide the
"Search for: All conditions Any condition"'
and the useless "not contain" radio button and dropdown with the one and only option "contain"

you can do a lot with the PHPrunner without too much knowledge on coding, but I can't get this to work:
[size="2"]<META name=GENERATOR content="MSHTML 8.00.7600.16535"></HEAD>

<BODY bgColor=white>{BEGIN body}{$header}

{BEGIN contents_block}<TABLE style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid" id="center_block{$id}" align=center>

<TBODY>

<TR>

<TD id="contents_block{$id}">

{BEGIN conditions_block}<DIV id="conditions_block{$id}"><SPAN

class=fieldname>Search for: </SPAN><INPUT type=radio name=srchType

{$all_checkbox}>{BEGIN all_checkbox_label}All conditions{END all_checkbox_label} &nbsp;&nbsp;&nbsp; <INPUT

type=radio name=srchType

{$any_checkbox}>{BEGIN any_checkbox_label}Any condition{END any_checkbox_label} </DIV>{END conditions_block}

<TABLE id="fields_block{$id}" border=0 cellSpacing=0 cellPadding=4>

<TBODY>

<TR class=blackshade vAlign=middle>

<TD vAlign=middle align=middle>&nbsp;</TD>

<TD class=fieldname vAlign=middle width=30 align=middle>NOT</TD>

<TD vAlign=middle colSpan=3 align=middle>&nbsp; </TD></TR>

{BEGIN Category_fieldblock}<TR class=shade>

<TD class=fieldname>Holiday Categories

<TD align=middle><INPUT type=checkbox {$Category_notbox}></TD>

<TD>{$searchtype_Category}</TD>

<TD width=270>{$Category_editcontrol}&nbsp;</TD>

<TD width=270>{$Category_editcontrol1}&nbsp;</TD></TR>{END Category_fieldblock}

{BEGIN Coverage_fieldblock}<TR class=shade>

<TD class=fieldname>Holiday Destinations&nbsp;

<TD align=middle><INPUT type=checkbox {$Coverage_notbox}></TD>

<TD>{$searchtype_Coverage}</TD>

<TD width=270>{$Coverage_editcontrol}&nbsp;</TD>

<TD width=270>{$Coverage_editcontrol1}&nbsp;</TD></TR>{END Coverage_fieldblock}</TBODY></TABLE>

<DIV id="buttons_block{$id}" class=blackshade>{BEGIN search_button}<SPAN class=buttonborder><INPUT class=button value=Search type=button {$searchbutton_attrs}></SPAN>{END search_button}

{BEGIN reset_button}<SPAN class=buttonborder><INPUT class=button value=Reset type=button {$resetbutton_attrs}></SPAN>{END reset_button}

{BEGIN back_button}<SPAN class=buttonborder><INPUT class=button value="Back to list" type=button {$backbutton_attrs}></SPAN>{END back_button}

</DIV></TD></TR></TBODY></TABLE>{END contents_block}{$footer} {END body}</BODY></HTML>
even with the above information (sorry I am learning)
thank someone in advance for the big help

[/size]

J
Jane 5/3/2010

Hi,
you can add style="display:none;" to each control you want to hide. Here is a sample:

<DIV id="conditions_block{$id}" style="display:none;"><SPAN

class=fieldname>Search for: </SPAN><INPUT type=radio name=srchType

{$all_checkbox}>{BEGIN all_checkbox_label}All conditions{END all_checkbox_label} &nbsp;&nbsp;&nbsp; <INPUT

type=radio name=srchType

{$any_checkbox}>{BEGIN any_checkbox_label}Any condition{END any_checkbox_label} </DIV>