473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Creating dynamic form with ASP and user inputs

I have a web form that users input answers and when submitted I want the ASP code to place the user inputs into certain locations of a HTML form. The form is then automatically opened in a new window and the user can then view, print or save the HTML document. I don't need the data to be saved or stored in a database, just placed in the HTML document. I can create the form document in HTML or PDF whatever is easier to work with.

Can anyone provide a small sample of this code, once it works I can modify as needed.

I have ASP code and a form created and can supply the code if this will help but I thought it would be to much to post.

Thanks,
JR
Feb 27 '07 #1
6 8019
I have a web form that users input answers and when submitted I want the ASP code to place the user inputs into certain locations of a HTML form. The form is then automatically opened in a new window and the user can then view, print or save the HTML document. I don't need the data to be saved or stored in a database, just placed in the HTML document. I can create the form document in HTML or PDF whatever is easier to work with.

Can anyone provide a small sample of this code, once it works I can modify as needed.

I have ASP code and a form created and can supply the code if this will help but I thought it would be to much to post.

Thanks,
JR
You can use Scripting.FileSystemObject and store your data in simple txt files, when you needed that you can simply use that files with asp code to retrive your data.
Feb 28 '07 #2
jhardman
3,406 Expert 2GB
If you don't need to save the text, just point the first form to an asp. For example, if you have a text area in your original form named "myText" and a select named "mySelect", the ASP to which you send the form could look like this:
Expand|Select|Wrap|Line Numbers
  1. <form>
  2. <input type="text" value="<%=request.form("myText")%>">
  3. <select>
  4. <option value="herrings"
  5. <% if request.form("mySelect") = "herrings" then response write "selected" %>
  6. >Herrings</option>
  7. <option value="anchovies"
  8. <% if request.form("mySelect") = "anchovies" then response write "selected" %>
  9. >Anchovies</option></select>
  10. </form>
  11.  
Good luck. Please let me know if this works for you.

Jared
Feb 28 '07 #3
jhardman
3,406 Expert 2GB
Or I guess you don't necessarily want the response in a form, right?
Expand|Select|Wrap|Line Numbers
  1. Value of "myText": <%=request.form("myText")%>
  2. Value of "mySelect": <%=request.form("mySelect")%>
  3.  
Jared
Feb 28 '07 #4
Or I guess you don't necessarily want the response in a form, right?
Expand|Select|Wrap|Line Numbers
  1. Value of "myText": <%=request.form("myText")%>
  2. Value of "mySelect": <%=request.form("mySelect")%>
  3.  
Jared

Thanks for the reply... I want my on-line form to populate fields in a html document. When they submit the on-line form the html document opens in a new window and allows the user to view and print the document with the information supplied with the on-line form. I have code for this but its not working. The file is called "control.asp" and the form is "form.tpl" I think everthing is created I just need the line of code that calls the control.asp and where is it placed.

I can supplied the code if it will help... thanks for the reply
Feb 28 '07 #5
jhardman
3,406 Expert 2GB
it should be in the form tag:
Expand|Select|Wrap|Line Numbers
  1. <form action="control.asp" method="post">
  2.  
Jared
Feb 28 '07 #6
it should be in the form tag:
Expand|Select|Wrap|Line Numbers
  1. <form action="control.asp" method="post">
  2.  
Jared
Thanks, we'll see if it works and i'll keep in touch...
Feb 28 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
5
by: pizzy | last post by:
I am having a problem with the last results. I can't seem to be able to get the input2A and input3A to appear. I don't seem to have a problem with the show and hide after a number is entered and...
2
by: Patrick | last post by:
I want to define a set of web-form templates in XML and render the equivalent web-form with ASP.NET, then process any input server controls on the form. Reading the XML file from Page_load is...
10
by: Mark Winter | last post by:
Hello, I am wondering if someone could point me in the right direction to figure out how to create a dynamic form. I have been developing programs in perl and oracle and have recently switched...
5
by: Nate | last post by:
Good Morning All, What we have is a dynamic business object that has varying numbers and types of properties. What it models is a generic saleable product. Not all products have the same...
4
by: jedimasta | last post by:
Good evening all, I'm a relatively new to javascript, but I've been working with ColdFusion and PHP for years so I'm not necessarily ignorant, just stuck and frustrated. Using ColdFusion I'm...
5
by: Guillaume BRAUX | last post by:
Hello, What I want to do is to add a userControl to a form class witch is a different class from the one the button is generated. For example, I want to instanciate a label in "class1" and add...
4
by: Brad Everman | last post by:
I have an HTML form that passes arrays of values to PHP. Basically, each row of the form tracks three separate values for processing. I have a JS program that will dynamically add (or delete) rows...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.