Link to home
Start Free TrialLog in
Avatar of D_basham
D_basham

asked on

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.
Avatar of venkateshwarr
venkateshwarr

If your dropdown is ddown, and your parent form has a hidden form element...
you can say

parent.forms[0].formvar.value=document.forms[0].ddown.value;
= Main.asp =

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


=dothings.asp=

<%

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.

-rca
Avatar of D_basham

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of anderson22
anderson22

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks that worked  Perfectly. :)