classic ASP variables to retrieve form variables dilemna

In answer to my previous question, I am able to save my form variables to cookies and retrieve them later when I return back to my site, but now I'm trying to figure out how to do as follows with no user interaction:

When I open up a confirmation page, I see that I can restore/retrieve my original form values, but now I want to assign these to classic ASP variables so I can construct an email message with them.  I read somewhere else that ASP variables cannot access javascript variables unless the form got submitted and then I can use the Request.Form for that purpose,

So I was thinking what I need is a way that a page can be landed upon, assign the hidden form fields from the cookie, then auto-submit to my page where the ASP variables can finally do their job.

I recall there was a way to do an auto-submit, but I forgot how and would appreciate any examples that can lead me to what I want to accomplish.
accucomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
<script>
window.onload=function(){
  document.getElementById('formWithHiddenVariables').submit();
};
</script>
<form target="hiddenFrame" id="formWithHiddenVariables" method='post' action='yourPage.asp'>
...
</form>
<iframe id="hiddenFrame" name="hiddenFrame" src="#" style="position:absolute;left:-100em;"></iframe>

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
accucomAuthor Commented:
It seems to do the trick at least.  I wasn't quite clear about the iframe tag and why the frame tag targeted the iframe area.
0
hieloCommented:
it's meant to submit the form via the hidden frame (target="hiddenFrame"). That way the page does not leave teh current url when the form is submitted.

Under "normal" circustances if you have the following on page1.asp
<form action="page2.asp">

after you submit it, the browser both submit AND navigate to page2.asp. IT sounded like you do not want to navigate away from "page1.asp". Hence the reason it submits it via the hidden frame. The "main" window does not change url.

Make sense now?
0
accucomAuthor Commented:
I think I get it now even though now after that project has been completed I would do a few things a bit differently such as refering back to my original cookie-saver form, make it an asp page and use the querystring method to determine whether this was a page returned back to from external site or not so I wouldn't have to have a duplicate form on a separate asp page.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.