Andornot Consulting Inc.
Home Page
Home Page
 |  | 

Monday, October 17, 2005

Run query on page load

To run a canned query when a web page is loaded, instead of a user having to manually begin the query by clicking a link:
<head> <script type="text/javascript"> window.location.replace("http://localhost/dbtw-wpd/exec/dbtwpub.dll ?AC=QBE_QUERY&TN=cars&RF=Full+information&QY=Findall"); </script> </head>
Obviously the query itself will change depending on your needs, but the key is to set the window.location to the canned query url.

2 Comments:

Anonymous said...

I am trying to get a running total of the number of records in a textbase to show up on a web page (without the user having to run a canned search for all the records). Your post sounds like it might be what I am looking for, but I'm not sure how to implement it. I put the script into the header of my page, but that's obviously not the whole story. How do I get the results of the canned search to display (and not on a second page, either.

4:44 PM  
Peter Tyrrell said...

How to solve this depends on what errors/problems you are actually encountering. Contact me by email, ptyrrell@andornot.com

5:31 PM  

Post a Comment

<< Home