• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

Passing values of in an form

Hello everyone, I know your busy and this is probably not hard but I am not sure why it isn't working. IF i have a dropdown box or input box an asp form and when I click on the submit I am opening another window up with another asp form to fill out more information. I need to pass that dropdown and input box information from my first form to my second form. How do I do that. I am not sure.
1 Solution
If your dropdown is ddown, and your parent form has a hidden form element...
you can say

= Main.asp =

  <form action = "dothings.asp" method = "post">
    <select name = "stuff">
      <option value = "A" >A</option>
      <option value = "B" >B</option>
    <input type = "text" name = "stuff2">



strStuff = Request.Form("stuff")
strStuff2 = Request.Form("stuff2")

Is the second window a popup?  If not, you can just change the target of the form to "_blank" and this will send the form data to the second window.  At that point, you can use the ASP Request object to access the data.

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

D_bashamAuthor Commented:
Thanks for the help. It still not giving me the info. Maybe it is my submit button code. This is what I have

onClick="window.open('SoftwareRequest.asp','InfoFrame','resizable=yes,scrollbars=yes,menubar=yes, top=5, width=550%, height=550, left=2');">

Am i missing something. I already tried the 'SoftwareRequest.asp'?<%Department=<% response.write ("Department")%> It just returned the literal. Thanks
From your popup, SoftwareRequest.asp, you can use the following javascript to get the values from the parent window:


You can use this to get the values via client side script.  This means that the values won't be available to your server side code.

Alternately, you can add the code to your onclick submit button.  Something like:

onClick="window.open('SoftwareRequest.asp?NAME=' + document.formnamt.elementname.value + '&NAME2=' + document.formnamt.elementname.value,'InfoFrame','resizable=yes,scrollbars=yes,menubar=yes, top=5, width=550%, height=550, left=2');">

D_bashamAuthor Commented:
Thanks that worked  Perfectly. :)
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.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now