Submit via ASP Code

J

James Baker

I have an intermediate page that takes a querystring, does a query on a
database and writes out hidden values for each returned record. This design
layout is necessary for a variety of reasons and not subject to change.

I need the form to never be seen, essentially it needs to write out the
hidden values and immediately post to another form when it's done. I have
everything accomplished but the posting. Is there a technique to post the
form via code as opposed to a submit button or something of that nature?

Thanks,
James
 
S

Steven Burn

You'd be better off uing client side Javascript to do this, but I'm a little
concerned about why your using a form you don't essentially need?.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
V

Vance Kessler

I am not exaclty sure what you are trying to do here but...

You can always write a little javascript code at the end of the file (or on
onload) that would simply call the click event of the submit button like
this:

document.getElementById('submitBtn').click();

I am confused why you have to go back to the client at all if you are not
allowing them to do anything with the values.
 
D

David C. Holley

I'm with the others and would ask my favorite of all questions - What
are you trying to accomplish? Just because one particular design was
initially utilized, doesn't mean that it was the best possible design
for the problem. If the design layout is neccessary as you say, please
share the specifics with us as to why its neccessary.

David H
 
B

Bob Barrows [MVP]

Vance said:
I am not exaclty sure what you are trying to do here but...

You can always write a little javascript code at the end of the file
(or on onload) that would simply call the click event of the submit
button like this:

document.getElementById('submitBtn').click();
Why bother with that? Just

document.forms(0).submit();
 
S

Slim

What every one including myself is concerned with is that you are trying to
post info to the server that you already have on the server

what ever is done with that info when it is submitted should be done on the
the page you want to resubmit

but anyway, ill show you want you need, but i think it is teh wrong way to
go about it

put this at the end of the page
<SCRIPT LANGUAGE=javascript>
document.forms(0).submit()
</SCRIPT>
 
D

David Holley

Actually, now that I think about it - If you're concerned abou t the
amount of work neccessary to alter things so that a page isn't sent to
the client, it shouldn't be that difficult. All it should take is
putting the ASP for both pages on the same page and then altering the
code to store/retrieve the values in variables or an array. You'll be
using the variables for what they were intended for (to store
information) which is what you're using the form fields for.


David C. Holley
www.gatewayorlando.com

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top