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.
Who is Participating?
hieloConnect With a Mentor Commented:
<form target="hiddenFrame" id="formWithHiddenVariables" method='post' action='yourPage.asp'>
<iframe id="hiddenFrame" name="hiddenFrame" src="#" style="position:absolute;left:-100em;"></iframe>

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.
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?
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.