This topic is locked

passing data to first page

2/12/2004 12:47:39 PM
ASPRunnerPro General questions
B
billprozac author

For those of us who are using the created pages with annon access, it would be nice to be able to create links to the page with search criteria already specified.

For example...
Click here to view x records [link to http://yoursite/db_list.asp?sopt='Equa...rit='x']
or somethign like that. That way the results page shows all criteria for a specific search which has been pre programmed.

Sergey Kornilov admin 2/13/2004

Hi,
here is how it can be done:

<form method="POST" action="cars_list.asp" name="frmAdmin">

        <input type="hidden" id="action" name="action" value="Search">

                <input type="hidden" id="PageSize" name="PageSize" value="20">

                <input type="hidden" id="SearchOption" name="SearchOption" value="Contains">

                <input type="hidden" id="SearchField" name="SearchField" value="AnyField">

        <input type="hidden" id="SearchFor" name="SearchFor" value="Any search text here">
</form>
<a href="#" onClick="document.forms.frmAdmin.submit(); return false;">Click to see results</a>


You will need to change target file name and search text.
I hope this helps.

S
spacearchive 4/19/2004

Hi,

here is how it can be done:
You will need to change target file name and search text.
I hope this helps.



Wonderful!

Is it possible to make the redirect be automatic?

For example, substitute the "Click to see results" with a "Wait to see results" and make no need of a click.
Thanks!

Sorry for my English!

Davide

Sergey Kornilov admin 4/20/2004

Davide,
here is what you can try. Instead of

<a href="#" onClick="document.forms.frmAdmin.submit(); return false;">Click to see results</a>


use:

<script language="JavaScript">

document.forms.frmAdmin.submit();

</script>