Hey Everyone,
Well this is probably a pretty easy question, but for some reason i just can not figure it out.
What i am trying to do is redisplay what was entered previously. I have figured everything out except for this drop down box.
Right now i am using one cfoutput query to display in the drop down box the values for it that are in the database. However, now i created a second query to display what was entered previously. The thing is i know i can't use 2 cfquery outputs around the same drop down box an so i was wondering how would i make the drop down box still have the options in the drop down box but also show what was previously selected?
here is what i have - this gets the values for the status
-
<cfquery name="getstatus" datasource="CustomerSupport">
-
usp_CS_getTicketStatuses
-
</cfquery>
-
-
this is to display what was selected
-
<cfquery name="ticket" datasource="CustomerSupport">
-
SELECT pk_ticketID,title,priority,
-
status,cost_center,fk_customer_number,
-
customer_company,customer_Fname,customer_Lname,
-
customer_add1,customer_city,customer_state,
-
customer_zip,customer_email,customer_pri_phone,
-
customer_sec_phone,customer_notes,htpp
-
FROM dbo.tbl_CS_ticketMaster
-
</cfquery>
-
-
<select name="status">
-
<option value="" selected>Make A Selection</option
-
>
-
<cfoutput query="getstatus"><option value="#pk_status#"<cfif #pk_status# is #status#>selected</cfif>>#status_display#</option>
-
</cfoutput>
-
Thank you in advance,
Rach
4 8461
solved the problem to my own question, Thank you :)
Rach
acoder 16,027
Recognized Expert Moderator MVP
Can you post the solution for the benefit of others. Thanks.
Hey Acoder,
Here was my solution -
<cfoutput query="ticket">
-
<cfset status = #status#>
-
</cfoutput>
-
*Status<select name="status">
-
<option value="" selected>Make A Selection</option
-
><cfoutput query="getstatus"><option value="#pk_status#"<cfif #pk_status# is #status#>selected</cfif>>#status_display#</option>
-
</cfoutput>
-
</select>
acoder 16,027
Recognized Expert Moderator MVP
Thanks for posting the solution. You could also use #ticket.status# .
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Laphan |
last post by:
Hi All
Sorry for the confusing subject, but I'm hoping that you will be able to
help.
In very basic terms I want to emulate a <SELECT> HTML box in VB.
All I want to do is display a title name in the drop-down list, but the
actual value I use would be something else.
|
by: Dan |
last post by:
Can anyone offer suggestions on how to do this or if it is possible?
I have a form that uses a drop down box and 2 text fields.
What I am trying to do is have the value of each text box set by the
choice from the drop down box.
Something like:
<form name="populatefrm" id="contactfrm" method="post"
|
by: John Walker |
last post by:
Hi,
On an ASP.NET page I have a drop down list control. When the user pulls
down the list and makes a selection, I perform validation, and if the
validation fails I want the selected item in the drop down box to go back to
what the value was before the user tried to change it, but at that point I
will not know what the original value was. Or is there a drop down control
"revert" method, or is there any way of knowing what the original...
|
by: tsunet |
last post by:
HI..
I wana display that, initially in a one drop down control there will be some values.
Initially, 2nd drop down control will be disabled. if user selects 1st drop down then and then only value which user has selected in 1st drop down control will be displayed in 2nd drop down control. The values can be selected randomly.
Plz tell me.
|
by: tsunethere |
last post by:
hi ..
I have 2 drop-down boxes. at first when web page will get load value this drop-down value will be"---" in this fashion. and 2nd drop-down will be disabled. unless and until user selects item from 1st drop-down 2nd will be disabled. As soon as user enter value in 1st drop-down, 2nd will get enabled and user can select value in 2nd drop-down!I want to do it server side with perl only.
I want to do like this :
if (value in drop-down1...
| |
by: penny111 |
last post by:
Hi there,
For my application, i need to have 3 drop down lists
1. drop down list of folder names
2. drop down list of documents in the folder selected
3. drop down list of instances of the document selected
(my application uses the BusinessObjects Java Web Services SDK)
The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do
-select a folder from the...
|
by: bimeldip |
last post by:
Hi,
i would like to display the list of tables in a database in a drop down list
then when user selects a table, the table will be dispalyed on the page.
So far i've done this:
<?
$dbname = 'mysql_dbname';
// Get records from database ().
$sql = "show tables from $dbname";
$result=mysql_query($sql);
|
by: Chrisjc |
last post by:
have one page that has a drop down menu, once the user selects the desired option it will then pass the selected value to a 2nd drop down. Once they select there next option I pass that value...
Now I would like to hold the 2nd selected value have it search the database find all that match the selected and then only display what matches it in the corresponding ROWS in the database.
I was hoping to get some help with an array because I...
|
by: ajos |
last post by:
Hello all,
Im making a dependent drop down for my application for filtering purpose. I have populated the drop down from the database and retrieved in the html.
<tr>
<td valign="top" width="138" height="26"><small><font face="Verdana"><strong>Branch</strong></font></small></td>
<td width="379" height="26">
<select name="branch" size="1" onChange="messValue()">
<option value="">(select branch)</option>
<%
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |