Solved

Database Record

Posted on 2003-11-07
4
191 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
[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
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

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…

726 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