This topic is locked

Advance Search

10/2/2006 12:11:08 PM
ASPRunnerPro General questions
B
Bryan author

Hi there,
I'm hoping to write a series for pre-defined searches for my users which are displayed as hyperlinks on the Advanced Search page.
The code for the hyperlink so far looks like this:
<a href="#" onclick="java script:

Current_Status.value='Settled';

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

{

if (File_Holder[i].text == 'Julie Cawley' || File_Holder[i].text == 'Claire Hopkins')

{File_Holder.options[i].selected=true}

}">Report 1</a></td>
When the user clicks Report 1, Julie and Claire are automatically highlighted in the File_Holder field and Current_Status is set to Settled.
What I now wish to do is change the Contains / Equals field for Current_Status but don't know how to reference it. The value will vary from report to report so I cannot hardcode the value (as per an older thread)
I'll need to do this for other fields on the advanced search screen too, once i've written the value to them.
Could anyone please advise of a simple way to do this?
In addition, and assuming the above is possible, can anyone advise of assigning the values to two dates fields if I set a date field search criteria to "Between"?
Many thanks in advance,

Bryan

B
Bryan author 10/3/2006

Hi,
I take it this isn't easily done?
Any feedback would be appreciated - I'm new to asp / java.
Many thanks,

Bryan

Sergey Kornilov admin 10/3/2006

Bryan,
something like this should work (ASPRunnerPro 4.1):

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

{

if (asearchopt_File_Holder[i].text == 'Equals')

asearchopt_File_Holder.options[i].selected=true;

}
C
chris 10/3/2006

Is there a way to use the Search or Advanced Search to list a field from the table to be viewed?

What I mean is that I am using a oracle table view to layout a report based on a selected or 'filtered' table field, and I would like the user to be able to select from a list of available reports instead of having to type in the filter.

Any help would be appreciated.

Thanks,

Chris.

Sergey Kornilov admin 10/3/2006

You can use Advanced Search form and Lookup wizard "Edit as" type.

B
Bryan author 10/4/2006

Sergey,
Many thanks for your reply.
I've installed the latest version and it all works using the following code:
<a href="#" onclick="java script:

asearchopt_Insurer_Reference.value='Between';

asearchopt_Current_Status.value='Between';

value_Insurer_Reference.value='ABCDEFG';"

>test report</a>
My next questions is how can the above code be amended to bring up the 2nd set search boxes for Insurer_Reference and Current_Status? If I change a "Contains" field to "Between" on screen, the 2nd set of search boxes are immediately displayed but assigning the value (as per my code above) does not.
Many thanks for your help again - the new version looks excellent.
Bryan