Solved

Passing values of in an form

Posted on 2004-04-01
6
480 Views
Last Modified: 2012-05-04
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.
0
Comment
Question by:D_basham
6 Comments
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10737136
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;
0
 

Expert Comment

by:dlzone
ID: 10737869
= 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")

%>
0
 
LVL 4

Expert Comment

by:anderson22
ID: 10738379
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
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:D_basham
ID: 10740623
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
0
 
LVL 4

Accepted Solution

by:
anderson22 earned 55 total points
ID: 10741210
From your popup, SoftwareRequest.asp, you can use the following javascript to get the values from the parent window:

opener.document.formname.elementname.value;

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');">

-rca
0
 

Author Comment

by:D_basham
ID: 10743771
Thanks that worked  Perfectly. :)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Group by correlation 4 57
VBScript FormatCurrency - how to change the currency symbol 4 46
SQL Filter Question 8 82
sql to convert to date IF entry is in date format 4 81
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question