Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit question

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
I have a form page where the user selects from a drop down list and then clicks on a submit button. The form selection is sent to an ASP file for processing. Is it possible for the form page to remain unchanged and the ASP program to open the results in a new window? Mise Le Meas,

Mighty :)
 
Yes, it is.

Code:
<FORM method=&quot;POST&quot; action=&quot;result.asp&quot; target=&quot;_blank&quot;>

I don't know if this works for all browsers, but at least IE5 understands it. Yours,

Rob.
 
When you do it that way, the form submits as if you used the GET method. All the form contents appear as a query string after the ASP file.

Is there a way around this?? Mise Le Meas,

Mighty :)
 
You could do this using JavaScript; just submit to page to itself (just refresh it or whatever and spit out some javascript)

(remember, this just pseudocode)
Code:
<%
 if request.form(&quot;submit&quot;) <> &quot;&quot; then
     'process submit here
     session(&quot;name&quot;) = request.form(&quot;name&quot;)
     session(&quot;email&quot;) = request.form(&quot;email&quot;)
     
     'now trigger a popup in JScript
%>
<script language=&quot;JavaScript&quot;>
    var newwin = window.open('output.asp')
</script>
<%  
 else
     'normal code
 end if
%>

And in output.asp just refer to your session variables. Yours,

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top