Solved

Database Record

Posted on 2003-11-07
4
185 Views
Last Modified: 2013-12-24
I have a query with Microsoft Frontpage because I am trying to learn HTML and ASP.

I have a list box on a web page that gets its values from a table called dbo_PRODUCT and a field called PRODUCTCODE.  When I publish the asp page it displays a list of the codes in that field.

What I dont know how to do is this :

The dbo_product table has columns of :

PRODUCTCODE      DESCRIPTION

I want to create a text box, so when the user selects a code from the productcode list the text box populates itself with the description.


Also I want to create a text box where the user can enter feedback.  I then want them to click a button called Save which will add the record to a table called Comments which has fields of PRODUCTCODE and COMMENTS.  So I want to be able to tell the form to add the record and use the PROUCTCODE that was selected in the list.

Can someone please help me through my learning curve ?  
0
Comment
Question by:Northumberland
4 Comments
 

Author Comment

by:Northumberland
ID: 9706297
Does anybody know the answer to this ?
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9712129
Northumberland You posted the same question under Dreamweaver,
Did you to try to Follow those instructions?
0
 
LVL 10

Expert Comment

by:KenAdney
ID: 9716859
If I understand your question, here's how I propogate a drop down list from a database field.  First, I set up the sub routine:

'this sub requires that the data connection be established first (DataConn)
Sub drop_down_list(field_name,table_name)

sql_dropdown = ("SELECT DISTINCT " & field_name & " FROM " & table_name & " WHERE " & field_name & " <> '' ORDER BY " & field_name)
Set rs_dropdown = Server.CreateObject("ADODB.Recordset")
rs_dropdown.Open sql_dropdown, DataConn
response.write("<select name=" & field_name & " size='1'>")
response.write("<option value='0' selected>Select from list</option>")
rs_dropdown.MoveFirst
While Not rs_dropdown.EOF
      field_value = rs_dropdown(field_name)
      response.write("<option value='" & field_value & "'>" & field_value & "</option>")
      rs_dropdown.MoveNext
Wend
response.write("</select>")
rs_dropdown.Close
Set rs_dropdown = Nothing

End Sub
%>

Then wherever I want the drop down to appear, I only need:

<%call drop_down_list("field","table")%>
0
 
LVL 14

Accepted Solution

by:
hhammash earned 500 total points
ID: 9718571
Hi,

Try this sample:
http://www.fmhs.uaeu.ac.ae/nml/900test.asp


Here is the article that explains how to do it.  In your case you can add another text area in the second form for feedback.

http://www.experts-exchange.com/Applications/MS_Office/FrontPage/Q_20780976.html

Regards
hhammash
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Renaming file after uploading in Coldfusion 4 269
LMS Tracking Survey Result 1 51
How does Amazon build their pages? 3 76
How to setup a password to enter my web page? 3 117
When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

808 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