Meg Briggs wrote: >I have a page that has three forms on it. For the first two forms, the user >selects a name from the list and it popuplates the rest of the fields for that >form. On my third form, the user needs to select one of three radio buttons, >then enter text to search for, then execute the query. I would like to have >the third form's fields then populated with the results, as there can only be >one record in the result set. > >What is the best way to do this? I have my javascript functions to do the >first two forms, but I can't figure out how to execute the query and get the >results to the third form. My code is below. Thank you. > You need to look at using WDDX to convert CFML variables to JS variables for all your forms.
<option value="#rsContact.SupervisorID#" LastName="#rsContact.LName#" FirstName="#rsContact.FName#" txtTitle="#rsContact.Title#"> I'm certain that this is not valid html and may cause you problems in most browsers by not being available in the DOM. To be honest, having looked through the code you gave, I think I would be tempted to simplify this greatly or change tact completely and go for a CF/Flex solution instead of a CF/HTML/JS solution. Rather than trying to do everything all in one page, have a page for listing and managing Points of Contact, a page for listing and managing Physician Groups and a page for listing and managing Physicians. If you only want Physician groups to be listed for a particular Contact or Physicians listed by their group, then use appropriate drop downs to restrict the list of groups or physicians that is displayed. In the case of the Physicians page have a couple of linked drop down boxes in one form, so that you select the contact, the list of groups is changed via JS to list only those groups for this contact and then when you select the group, submit the form to an action page that can take these 2 values and get the physicians from the database, display a simple list of names and a link to take the user off to a page to edit an individual physicians details. (Take a look for the TwoSelectsRelated custom tag in the MM Tag Gallery) I hate to generalise, but "users" as a group are not that bright. You need to keep things simple for them, otherwise they get confused, break things and stop using the applications they've just spent a small fortune to have built or go off to someone else and spend more money to get it rebuilt (usually using a different technology, because the other developer says that CF isn't capable of something this complex, which is a load of rubbish). So in short K.I.S.S ;) Sorry that that has not really answered your question, but hopefully it will point you in a more productive direction. Regards Stephen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:700 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
