Solved

Passing values of in an form

Posted on 2004-04-01
6
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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