Solved

Create form to input multi records using ASP, VBscript, or Javascript

Posted on 2010-09-23
9
482 Views
Last Modified: 2012-05-10
We want to submit several records into a database table. Currently we do it by importing an Excel sheet, that has the fields in columns, and each row will be a record. How to do this with a webpage, with a link to add an extra line (= record)?

For example, this would be rough example of a table, that we would like to create dynamically line by line on a webpage form:-

record  field1 field2 field3
1            212    34     mod
2            432    54     tran
3            764    21     tour
0
Comment
Question by:pld51
[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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 18

Accepted Solution

by:
mgfranz earned 250 total points
ID: 33743751
<form action="doInsert.asp">
Field1: <input type="text" name="field1" /><br>
Field2: <input type="text" name="field2" /><br>
Field3: <input type="text" name="field3" /><br>
<input type="submit" name="submit" />
</form>
0
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 250 total points
ID: 33743756
create an xml from these values, something like

<records>
   <record id="1" field1="212" field2="34" field3="mod"\>
   <record id="2" field1="432" field2="54" field3="tran"\>
   <record id="3" field1="764" field2="21" field3="tour"\>
</records>

and then submit this string to server using post method

once your have fetched this values are server side, you can create the objects out of it and then save them in db
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 33743767
Or maybe I don't understand the question...
0
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 33744055
0
 

Author Comment

by:pld51
ID: 33745050
Sorry, my question wasn't clear enough it seems. The form itself is not a problem, adding extra lines dynamically was my problem. mplungjan's solution looks like a good answer, using jquery to add another line (=record) to input line by line and then click submit at the vey end.

I am trying out the second link given by mplungjan.
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 33745088
<<Sorry, my question wasn't clear enough it seems.>>
You simply had to write, how to add the form elements row dynamically

I think you are looking something like this
http://www.mredkj.com/tutorials/tableaddrow.html
this is also good
http://www.java2s.com/Code/JavaScript/HTML/InsertingRemovingRowElements.htm
0
 

Author Comment

by:pld51
ID: 33745171
<<You simply had to write, how to add the form elements row dynamically >>
Yes, put like that it is quite clear.

To insert each record into the SQL table I presumably need to loop. As all the methods above will take some setting up, any idea which method likely to be easiest to loop through? Or all the same?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 33747929
I suggest jQuery because it is almost defacto standard. Gurvinder's link is from 2001 so almost 10 years old. jQuery will work on all modern browsers
0
 

Author Closing Comment

by:pld51
ID: 33856842
Thanks, and sorry for delay
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

Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This article discusses how to create an extensible mechanism for linked drop downs.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

623 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