Auto Submit

J

Jehuty

When a user accesses the form where the data is displayed, how can i auto
submit a search value once the user views the form?
 
T

Thomas A. Rowe

Best option is to create submit button, and let the user click it.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jehuty

The reason i need the page to do an autosubmit is because the field database
criteria is set to equal the identity number. Thats why i would like the code
for it.
 
T

Thomas A. Rowe

I am not sure that I am following what it is you are trying to accomplish.

If you auto submit from the page the user is viewing, then user will not see the page as the page
would submit as soon as the user clicks on it.

You can pass a lookup value to a page that will automatically query the database, via either a form
field or a querystring, is this what you want to accomplish?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Thomas A. Rowe

Ok, give me the steps and methods up to where you want to query the database.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jehuty

basically, when a user clicks on the link, it creates an ID

submission_form.asp?identity=<%=FP_FieldURL(fp_rs,"Key")%>

Then once its in the submission form, the ID is automatcially inserted into
the MapID textbox i have. (MapID is the name of the DBField as well) What im
trying to figure out is how to automatically send the value of the MapID to
bring up the results.
 
T

Thomas A. Rowe

Where do you want to display the results, on the Submission Page or a page after that?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jehuty

im sorry, i meant to say the Results page not the submission page
so it would be

results_page.asp?identity=<%=FP_FieldURL(fp_rs,"Key")%>
 
T

Thomas A. Rowe

Ok, then do this on results_page.asp

<%
Dim MapID
MapID = Request.Form("MapID")

' In your query do this if the MapID is a text field in the database

"SELECT * FROM tablename WHERE MapID = '" & MapID & "' "

' If the MapID is a number field, then do this instead

"SELECT * FROM tablename WHERE MapID = " & MapID

You will need to write the other parts of the complete query function
%>
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jehuty

I just tried entering that into the custom query but did work. When i bring
up the results page in a browser, it just says "No records returned"
 
T

Thomas A. Rowe

Sorry, I can not tell you how to change my code to work with the FP Database components, as I hand
code everything.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Top