?
Solved

Database Record

Posted on 2003-11-07
4
Medium Priority
?
209 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 2000 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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

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…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
Suggested Courses

762 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