Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

forms

Status
Not open for further replies.

farscp1

Programmer
Sep 18, 2005
33
US
I am trying to create an update menu based on a list of items (course numbers) that once the user selects a course the list of attendees will be populated on that same screen. Once the names appear the user then has the ability to delete edit and add to the selected course.

I know how to do this be sending the information along through "action" pages but how does this happen one page, "real time".

Here is some of the code.

Code:
<cfquery name="getAttendees" datasource="seligins">
	SELECT firstname, lastname, h_email
	FROM tblAttendee
</cfquery>

<cfquery name="getCourses" datasource="seligins">
	SELECT course_id, course_name, course_date
	FROM tblCourse
</cfquery>

The code used to display the results are:
Code:
  <h3>Select Course</h3> 
  <table border="3" cellpadding="5" cellspacing="0" bgcolor="C0C0C0"> 
    <form action="updateAttendee.cfm" method="post"> 
      <tr> 
        <td rowspan="3"> 
		<!--- generate a dynamic select list based on the getPKUser query ---> 
          <select name="course_id" size="15"> 
            <cfoutput query="getCourses"> 
              <option value="getCourses.course_id" <cfif getCourses.CurrentRow EQ 1>selected</cfif>>#getCourses.course_date# #getCourses.course_name#</option> 
            </cfoutput> 
          </select> 
		 </td> 
        <td><input type="submit" name="Update" value="List Attendees"></td> 
      </tr> 
      <tr> 
        <td><input type="submit" name="Delete" value="Delete Registration"></td> 
      </tr> 
    </form> 
    <tr>

Thanks for your help.
 
if you don't want to make a request to the server you'll have to load all possible data the first time into JS arrays. Then use the js Arrays to rebuild the lists.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Many thanks for your reply. I've decided to accomplish this by just having the select lists on different. It's not as efficient a choice as what I wanted but given my knowlege and time left to complete this I have no choice. :)
 
LOL, csteinbillber. Thanks for all your replies. I will test soon. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top