Forums

This topic is locked

Dynamic Data in Html Form

Posted 25 Jan 2002 21:16:48
1
has voted
25 Jan 2002 21:16:48 Brian Mr posted:
Hello,
Is there a way to do this? I have a HTML form that is going to be submitted to a database. Instead of the end user filling out every field they could enter and employee number in one field. When they tabbed out of it would look up, in the database, the employee number and then populate the specified fields, on the HTML form, ie.. Last name, first name, assignment etc... all values that are stored in employee table, that match that employee number. After these field were populated you would hit the submit button to send the data to a different database.

Thanks in advance for the help

Brian Russell



Replies

Replied 25 Jan 2002 22:35:19
25 Jan 2002 22:35:19 Viktor Farcic replied:
You can let them insert their ID and message. That form should send data to other page that has table filtered with their ID passed as QuerySting. After that you can easily send data from DB, together with message, using CDONTS.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hello,
Is there a way to do this? I have a HTML form that is going to be submitted to a database. Instead of the end user filling out every field they could enter and employee number in one field. When they tabbed out of it would look up, in the database, the employee number and then populate the specified fields, on the HTML form, ie.. Last name, first name, assignment etc... all values that are stored in employee table, that match that employee number. After these field were populated you would hit the submit button to send the data to a different database.

Thanks in advance for the help

Brian Russell




<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 25 Jan 2002 22:41:48
25 Jan 2002 22:41:48 Lynn Bantley replied:
Brian,

Dynamic data will have to come from an asp form instead of html form.

The way I handle situations like yours (there are probably better ways) is to use an additional page.

Page 1: html form that simply asks the uesr to enter the employee number

Page 2: asp page that has recordset that uses Request("EmplNum" to get the record you want. Since the empl# was passed to this page from the previous page, you can then grab the records for that employee and display their name, assignments, etc.

Also on this page, you could then have the form that allows for input into the database for this particular empl...maybe a new assignment.

I would not populate any fields with the empl name, assignments, or anything like that, so as to prevent the person doing input from changing those values. There is not need to input the employee's name each time you add an assignment.

You would then submit this page, it inputs into the db, and then redirects. If there are multiple assignments to input, I would just redirect to the sme page.

Hope this helps,

Lynn

Reply to this topic