1 Replies - 7957 Views - Last Post: 18 March 2011 - 01:14 AM Rate Topic: -----

#1 MIGhunter  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 17-January 09

Making a drop down list

Posted 17 January 2009 - 07:24 PM

I've looked and looked and the only thing I can find is tutorials on doing multiple drop down lists based on what a user clicks. Ok this is a template from Forta's book WACK with a few modifications. The one modification I can't figure out is how to make the drop down list so that people only have certain choices when adding information. Ok, the nitty gritty:
2 tables.
Table 1: einherjar_priorities
Table 2: einherjar_items

The code for the whole application is this:
user_priority.cfc
<!---
Name:		einherjar_priority.cfc
Author:		Mike Gomez (admin@botdls.com)
Description:	Einherjar priority tracking system
Created:	1/11/2009
--->

<cfcomponent hint="Einherjar priority tracking system">

	<!--- Set the datasource --->
	<cfset ds="botd_2008">
	<cfparam name="sort" default="1">
	<!--- Get users --->
	<cffunction 	name="list"
			returntype="query"
			hint="List all users">

	<cfquery 	datasource="#ds#" username=" " password=" "
			name="user_priority">
	SELECT user_ID, user_name, dated_on, IP_address, CP1, CP2, OP1, OP2
	FROM einherjar_priorities
	ORDER BY
	<cfswitch expression="#sort#">

	<cfcase value="1">user_name</cfcase>
	<cfcase value="2">user_name desc</cfcase>
	<cfcase value="3">CP1</cfcase>
	<cfcase value="4">CP1 desc</cfcase>
	<cfcase value="5">CP2</cfcase>
	<cfcase value="6">CP2 desc</cfcase>
	<cfcase value="7">OP1</cfcase>  
	<cfcase value="8">OP1 desc</cfcase>
	<cfcase value="9">OP2</cfcase>	
	<cfcase value="10">OP2 desc</cfcase> 
	  
	</cfswitch>
	</cfquery>
	<cfreturn user_priority>

	</cffunction>


	<!--- Get details for a user --->
	<cffunction 	name="get"
			returntype="query"
			hint="Get user details">
	<cfargument	name="user_ID"
			type="numeric"
			required="yes"
			hint="User ID">

	<cfquery 	datasource="#ds#" username=" " password=" "
			name="user_priority">
	SELECT user_ID, user_name, dated_on, IP_address, CP1, CP2, OP1, OP2
	FROM einherjar_priorities
	WHERE user_ID=<cfqueryparam value="#ARGUMENTS.user_ID#" cfsqltype="CF_SQL_INTEGER">
	</cfquery>
	<cfreturn user_priority>

	</cffunction>

	<!--- Add a user --->
	<cffunction 	name="add"
			returntype="boolean"
			hint="Add a user">
	
	<!--- Method arguments --->
	<cfargument	name="user_name"
			type="string"
			required="yes"
			hint="User added">
	<cfargument	name="CP1"
			type="string"
			required="yes"
			hint="Chamber Priority 1">
	<cfargument	name="CP2"
			type="string"
			required="yes"
			hint="Chamber Priority 2">
	<cfargument	name="OP1"
			type="string"
			required="yes"
			hint="Odin Priority 1">
	<cfargument	name="OP2"
			type="string"
			required="yes"
			hint="Odin Priority 2">

	<!--- Insert user --->
	<cfquery datasource="#ds#" username=" " password=" ">
	INSERT INTO einherjar_priorities(	user_name,
				CP1, CP2, OP1, OP2)
	Values(	'#Trim(ARGUMENTS.user_name)#',
		'#Trim(ARGUMENTS.CP1)#',
		'#Trim(ARGUMENTS.CP2)#',
		'#Trim(ARGUMENTS.OP1)#',
		'#Trim(ARGUMENTS.OP2)#')
	</cfquery>
	<cfreturn true>

	</cffunction>

	<!--- Update the user --->
	<cffunction	name="update"
			returntype="boolean"
			hint="update user">
	<!--- Method arguments --->
	<cfargument	name="user_ID"
			type="numeric"
			required="yes"
			hint="user id">
	<cfargument	name="user_name"
			type="string"
			required="yes"
			hint="user name">
	<cfargument	name="CP1"
			type="string"
			required="yes"
			hint="Chamber Priority One">
	<cfargument	name="CP2"
			type="string"
			required="yes"
			hint="Chamber Priority Two">
	<cfargument	name="OP1"
			type="string"
			required="yes"
			hint="Odin Priority Two">
	<cfargument	name="OP2"
			type="string"
			required="yes"
			hint="Odin Priority Two">


	<!--- Update the user --->
	<cfquery datasource="#ds#" username=" " password=" ">
	UPDATE einherjar_priorities
	SET 	user_name='#Trim(ARGUMENTS.user_name)#',
		CP1='#Trim(ARGUMENTS.CP1)#',
		CP2='#Trim(ARGUMENTS.CP2)#',
		OP1='#Trim(ARGUMENTS.OP1)#',
		OP2='#Trim(ARGUMENTS.OP2)#'
	WHERE user_ID=<cfqueryparam value="#ARGUMENTS.user_ID#" cfsqltype="CF_SQL_INTEGER">
	</cfquery>
	<cfreturn true>

	</cffunction>

	<!--- Delete a user --->
	<cffunction 	name="delete"
			returntype="boolean"
			hint="Delete a user">
	<cfargument	name="user_ID"
			type="numeric"
			required="yes"
			hint="user ID">

	<cfquery datasource="#ds#" username=" " password=" ">
	DELETE FROM einherjar_priorities
	WHERE user_ID=<cfqueryparam value="#ARGUMENTS.user_ID#" cfsqltype="CF_SQL_INTEGER">
	</cfquery>
	<cfreturn true>
	</cffunction>

</cfcomponent>

einherjar_priority.cfm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>BotD-Where you wanna be!</title>
<link rel="stylesheet" href="../css/emx_nav_left.css" type="text/css">
	<style type="text/css" media="all">
		@import url("../examples/styles/youtube.css");
	</style>
<script type="text/javascript">
<!--
var time = 3000;
var numofitems = 7;

//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = 7;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
	var shutdiv =eval( "menuitem"+i+".thediv");
	shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event){
  if ((event.clientY <48)||(event.clientY > 107)){
	for (var i=1; i<= numofitems; i++){
	  var shutdiv =eval('menuitem'+i+'.thediv');
	  shutdiv.style.visibility='hidden';
	}
  }
}
// -->
</script>

<!--- Begin Tooltips --->
<script type="text/javascript" src="http://common.allakhazam.com/shared/akztooltip.js"></script> 
<!--- End Tooltips --->

</head>
<body onmousemove="closesubnav(event);"> 
<div class="skipLinks">skip to: <a href="#content">page content</a> | <a href="pageNav">links on this page</a> | <a href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a> </div>
<div id="masthead"> 
  <h1 id="siteName"><a name="Top"></a>Beacon Einherjar</h1> 
  <div id="utility"> 
	<a href="http://www.google.com/">Google</a> | <a href="http://www.ign.com/">IGN</a> | <a href="http://www.gamefaqs.com/">FAQs</a> 
  </div> 
  <div id="globalNav"> 
	<img alt="" src="../css/gblnav_left.gif" height="32" width="4" id="gnl"> <img alt="" src="../css/glbnav_right.gif" height="32" width="4" id="gnr"> 
	<div id="globalLink"> 
	  <a href="index.htm" id="gl1" class="glink" onmouseover="ehandler(event,menuitem1);">Home</a><a href="#" id="gl2" class="glink" onmouseover="ehandler(event,menuitem2);">Information</a><a href="#" id="gl3" class="glink" onmouseover="ehandler(event,menuitem3);">Beacon Dynamis</a><a href="Points/PointSystem.cfm" id="gl6" class="glink" onmouseover="ehandler(event,menuitem6);">Point Totals </a><a href="#" id="gl7" class="glink" onmouseover="ehandler(event,menuitem7);">Resources</a> <a href="http://www.botdls.com/phpBB2/index.php" id="gl8" class="glink" onmouseover="ehandler(event,menuitem8);">Forum</a>
	</div> 
	<!--end globalLinks--> 
  </div> 
  <!-- end globalNav --> 
  <div id="subglobal1" class="subglobalNav"> 
  </div> 
  <div id="subglobal2" class="subglobalNav"> 
	<a href="GeneralInformation.htm">General Information </a> | <a href="SkyRules.htm">Sky Rules</a> | <a href="HNMRules.htm">HNM Rules</a> | <a href="CoPRules.htm">CoP Rules</a> | <a href="Sackholders.htm">Sackholders</a>
  </div> 
  <div id="subglobal3" class="subglobalNav"> 
	<a href="Dynamis/Dynamis.htm">Dynamis Information</a> | <a href="Dynamis/BeaconRules.htm">Beacon Rules</a> | <a href="http://www.dynamisbums.com/">Dynamis Bums</a> | <a href="Dynamis/DynamisMaps.htm">Maps</a> | <a href="Dynamis/DynamisMembers.cfm">Members</a>
  </div> 
  <div id="subglobal4" class="subglobalNav"> 
	<a href="HNMRules.htm">HNM Rules</a>
  </div> 
  <div id="subglobal5" class="subglobalNav"> 
	<a href="SkyRules.htm">Sky Rules</a>
  </div> 
  <div id="subglobal6" class="subglobalNav"> 
  </div> 
  <div id="subglobal7" class="subglobalNav"> 
	<a href="http://ffxi.allakhazam.com">Allakhazam</a> | <a href="http://www.bluegartrls.com/forum/">Blue Gartr Forums</a> | <a href="http://www.clanwind.com/ffxi/fishing/">Fishing Database</a> | <a href="http://wiki.ffxiclopedia.org/wiki/Main_Page">FFXIcyclopedia</a> | <a href="http://www.titanictus.com/tools/guild/index.php?trade=Cooking&forecast=6">Guild Forecasts</a> | <a href="http://www.killingifrit.com">Killing Ifrit</a> | <a href="http://www.playonline.com">PlayOnline</a> | <a href="http://magitekarmy.com/skillchain.php">Skillchain Calculator</a> | <a href="http://ffxi.somepage.com/">Somepage</a> | <a href="http://ffxi-atlas.com/">Vana'diel Maps</a>
  </div> 
  <div id="subglobal8" class="subglobalNav"> 
	<a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
	link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8 link</a> | <a href="#">subglobal8
	link</a> | <a href="#">subglobal8 link</a> 
  </div> 
</div> 
<!-- end masthead --> 
<div id="pagecell1"> 
  <!--pagecell1--> 
  <img alt="" src="../css/tl_curve_white.gif" height="6" width="6" id="tl"> <img alt="" src="../css/tr_curve_white.gif" height="6" width="6" id="tr"> 
 <div id="breadCrumb"> 
  <a href="index.htm">Home</a>  </div>  
  <div id="pageName"> 
	<h2>Welcome to Beacon </h2> 
	<img alt="small logo" src="../Pictures/ffimage.jpg" height="59" width="42"></img> 
  </div> 
  <div id="pageNav"> 
	



	<div id="advert"> 
	  <img src="../Pictures/ffsales.jpg" alt="Final Fantasy box" width="107" height="68"></img> <a href="http://www.amazon.com/exec/obidos/tg/detail/-/B0002VYS3C/qid=1140470288/sr=1-1/ref=sr_1_1/102-4435017-4809702?v=glance&s=videogames">Buy</a> Final Fantasy XI.<br>

	  <a href="http://www.amazon.com/exec/obidos/tg/detail/-/B00012TIWS/ref=pd_sim_vg_1/102-4435017-4809702?v=glance&s=videogames">Buy</a> Chains of Promethia.
	</div>
	<div id="advert"> 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
">
<!-- Begin Official PayPal Seal --><a href="https://www.paypal.com/us/verified/pal=admin%40botdls%2ecom" target="_blank"><img src="http://www.paypal.com/en_US/i/icon/verification_seal.gif" height="15%" width="15%" border="0" alt="Official PayPal Seal"></A><!-- End Official PayPal Seal -->
</form>
	</div>
<div id="advert">

</div>  
  </div> 

  
  <div id="content">
	<div class="feature"><img src="../Pictures/Einherjar/odin.jpg" width="" height=""> 
	  <h3>Overview</h3> 
	  <p>
	   Welcome to the Beacon Einherjar Priority lotting add/update page.  This Adobe Coldfusion page will allow member to
	   set their priorities for Einherjar.  A few things to remember: Everyone must have a priority set. You can set your 
	   priority to either money or an item (Abjurations or Weapons) but you may not set it to both. I'm going to use the 
	   same system that we use in our BotD salvage group. (Thorjones' design with a few modifications.) You have a 1st priority 
	   and a 2nd priority.  Priorities <font color="red"><strong>MUST</strong></font> be posted on the 
	   <a href="http://migcfdesign.com/EinherjarPriorities/einherjar_priority_index.cfm">priority</a> form. If you have 4 more 
	   points than someone with the same 1st priority, you win the item. i.e. You have 10 points and I have 6, I can lot too.  
	   You have 10 and I have 5, I can not. If your second priority drops, nobody has it as a 1st priority and you are in the 
	   lead, you win it. If your 2nd priority drops and there is someone with it on 1st priority, they win it regardless of how 
	   many points you have. You can only change priorities from the 1st to the 7th of a new month. There will be a fee of 5 points for changing 
	   priorities before the 1st of the month and after the 7th. Once you obtain your 1st priority, your 2nd priority becomes your 
	   1st priority automatically. Then you may chose a new 2nd priority. Items will be based on their rarity. Some items like 
	   Aquarian Abjuration Head will be low cost, say 2-3 points. Other items like Earthen Abjuration Body will be more like 
	   10-15 points. Money items will be 2 categories. Lower price items (200k-) will be used to fund runs. Higher price items 
	   (500k+) will be like 5-8 points.
</p> 
	</div> 
	<div class="story"> 
<!---
Name:		formatTeaser.cfm
Author:		Mike Gomez (admin@botdls.com)
Description:	Blog database access component
Created:	1/20/2008
--->

<!---
	
	This library is part of the Common Function Library Project. An open source
	collection of UDF libraries designed for ColdFusion 5.0. For more information,
	please see the web site at:
		
		http://www.cflib.org
		
	Warning:
	You may not need all the functions in this library. If speed
	is _extremely_ important, you may want to consider deleting
	functions you do not plan on using. Normally you should not
	have to worry about the size of the library.
		
	License:
	This code may be used freely. 
	You may modify this code as you see fit, however, this header, and the header
	for the functions must remain intact.
	
	This code is provided as is.  We make no warranty or guarantee.  Use of this code is at your own risk.
--->

<cfscript>
/**
 * Displays n number of characters from a string without cutting off in the middle of a word
 * Code used from FullLeft
 * 
 * @param string 	 String to be modified. (Required)
 * @param number 	 Number of characters to include in teaser. (Required)
 * @param urlArgument 	 URL to use for 'more' link. (Optional)
 * @return Returns a string. 
 * @author Bryan LaPlante (blaplante@netwebapps.com) 
 * @version 3, July 31, 2003 
 */
function FormatTeaser(string,number){
	var urlArgument = "";
	var shortString = "";
	
	//return quickly if string is short or no spaces at all
	if(len(string) lte number or not refind("[[:space:]]",string)) return string;
	
	if(arrayLen(arguments) gt 2) urlArgument = "... <a href=""" & arguments[3] & """>[more]</a>";

	//Full Left code (http://www.cflib.org/udf.cfm?ID=329)
	if(reFind("[[:space:]]",mid(string,number+1,1))) {
		  shortString = left(string,number);
	} else { 
		if(number-refind("[[:space:]]", reverse(mid(string,1,number)))) shortString = Left(string, (number-refind("[[:space:]]", reverse(mid(string,1,number))))); 
		else shortString = left(str,1);
	}
	
	return shortString & urlArgument;

}
</cfscript>

<!--- Get a user --->
<cfinvoke 	component="user_priority"
		method="list"
		returnvariable="user_priority">

<cfset pagination = createObject("component", "components.Pagination").init() />
<cfset pagination.setQueryToPaginate(user_priority) />
<cfset pagination.setBaseLink("/EinherjarPriorities/einherjar_priority.cfm?") />
<cfset pagination.setItemsPerPage(10) />
<cfset pagination.setUrlPageIndicator("page") />
<cfset pagination.setShowNumericLinks(true) />

<table align="center" bgcolor="white" border="1" cellpadding="1">
<cfoutput>
	#pagination.getRenderedHTML()#
</cfoutput>
<br>

<!--- Page Header --->
<!--- <cfinclude template="header.cfm"> --->

	<!--- Loop through users --->
		<tr>
			<td align="center"><strong>User Name</strong></td>
			<td align="center"><strong>Edit</strong></td>
			<td align="center"><strong>Delete</srtong></td>
		</tr>	
	
	<cfoutput query="user_priority" startrow="#pagination.getStartRow()#" maxrows="#pagination.getMaxRows()#">

		<tr>
			<!--- User Name --->
			<td>#user_name#</td>
		
			<!--- Edit Link --->
			<td>
				[<a href="einherjar_priority_edit.cfm?user_ID=#user_ID#">Edit</a>]
			</td>
			<!--- Delete Link --->
			<td>
				[<a href="einherjar_priority_delete.cfm?user_ID=#user_ID#">Delete</a>]
			</td>
		</tr>
		
	</cfoutput>

	<tr>
		<td></td>
		<!--- Add user link --->
		<td colspan="2" align="center">
		[<a href="einherjar_priority_edit.cfm">Add</a>]
		</td>
	</tr>

</table>

	</div>

	<div class="story"> 
	   
	</div> 
  </div> 
   <div id="siteInfo"> 
	<img src="../Pictures/MIG.jpg" alt="MIG Designs" width="42" height="25"> <a href="mailto:admin@botdls.com">Contact Us</a> | <cfoutput>#year(now())#</cfoutput>
	Bringer of the Dawn</div> 
</div> 

<!--end pagecell1--> 
<br> 
<script type="text/javascript">
	<!--
	  var menuitem1 = new menu(7,1,"hidden");
			var menuitem2 = new menu(7,2,"hidden");
			var menuitem3 = new menu(7,3,"hidden");
			var menuitem4 = new menu(7,4,"hidden");
			var menuitem5 = new menu(7,5,"hidden");
			var menuitem6 = new menu(7,6,"hidden");
			var menuitem7 = new menu(7,7,"hidden");
	// -->
	</script> 
</body>
</html>

einherjar_priority_edit.cfm
<!---
Name:		einherjarpriority.cfm
Author:		Mike Gomez (admin@botdls.com)
Description:	Einherjar priority tracking system
Created:	1/11/2009
--->

<!--- Check that the username ID was provided --->
<!--- If yes, edit, else delete --->
<cfset EditMode=IsDefined("URL.user_ID")>

<!--- If edit mode then get row and edit --->
<cfif EditMode>

<!--- Get theuser record --->
<cfinvoke	component="user_priority"
		method="get"
		user_ID="#URL.user_ID#"
		returnvariable="user_priority">

<!--- Save to variables --->
<cfset user_name=Trim(user_priority.user_name)>
<cfset CP1=Trim(user_priority.CP1)>
<cfset CP2=Trim(user_priority.CP2)>
<cfset OP1=Trim(user_priority.OP1)>
<cfset OP2=Trim(user_priority.OP2)>

<!--- Form Text --->
<cfset FormTitle="Update a User">
<cfset ButtonText="Update">

<cfelse>

<!--- Save to variables --->
<cfset user_name="">
<cfset CP1="">
<cfset CP2="">
<cfset OP1="">
<cfset OP2="">

<!--- Form text --->
<cfset FormTitle="Add a User">
<cfset ButtonText="Insert">

</cfif>


<!--- Page Header --->
<!--- <cfinclude header.cfm> --->

<!--- Add/Update user form --->
<cfform action="einherjar_priority_process.cfm">

<cfif EditMode>
	<!--- Embed primary key as a hidden field --->
	<cfoutput>
	<input type="hidden" name="user_ID" value="#user_priority.user_ID#">
	</cfoutput>
</cfif>

<table align="center" border="1" padding="1" bgcolor="white">
	<tr>
		<th colspan="2">
			<cfoutput>
			<font size="+1">#FormTitle#</font>
			</cfoutput>
		</th>
	</tr>
	<tr>
		<td>
			Game Name:
		</td>
		<td>
			<cfinput	type="text"
					name="user_name"
					value="#user_name#"
					message="USER NAME is required!"
					required="yes"
					validateAt="onsubmit,onServer"
					size="50"
					maxlength="100">
		</td>
	</tr>
	<tr>
		<td>
			Chamber Priority One:
		</td>

		<td>
			<cfinput	type="text"
					name="CP1"
					value="#CP1#"
					message="CHAMBER PRIORITY is required!"
					required="yes"
					validateAt="onsubmit,onServer"
					size="50"
					maxlength="100">
		</td>
	</tr>
	<tr>
		<td>
			Chamber Priority Two:
		</td>

		<td>
			<cfinput	type="text"
					name="CP2"
					value="#CP2#"
					message="CHAMBER PRIORITY is required!"
					required="yes"
					validateAt="onsubmit,onServer"
					size="50"
					maxlength="100">
		</td>
	</tr>
		<tr>
		<td>
			Odin Priority One:
		</td>

		<td>
			<cfinput	type="text"
					name="OP1"
					value="#OP1#"
					message="ODIN PRIORITY is required!"
					required="yes"
					validateAt="onsubmit,onServer"
					size="50"
					maxlength="100">
		</td>
	</tr>
		<tr>
		<td>
			Odin Priority Two:
		</td>

		<td>
			<cfinput	type="text"
					name="OP2"
					value="#OP2#"
					message="CHAMBER PRIORITY is required!"
					required="yes"
					validateAt="onsubmit,onServer"
					size="50"
					maxlength="100">
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center">
			<cfoutput>
			<input type="submit" value="#ButtonText#">
			</cfoutput>
		</td>
	</tr>
</table>

</cfform>

<!--- Page footer --->
<!--- <cfinclude template="footer.cfm"> --->


einherjar_process.cfm
<!---
Name:		einherjar_priority_process.cfm
Author:		Mike Gomez (admin@botdls.com)
Description:	Einherjar Priority tracking system
Created:	1/11/2009
--->

<!--- Edit or Update? --->
<cfif IsDefined("FORM.user_ID")>
	<cfset method="update">
<cfelse>
	<cfset method="add">
</cfif>

<!--- Do it --->
<cfinvoke component="user_priority"
	method="#method#">
<!--- user_ID only if update method --->
<cfif IsDefined("FORM.user_ID")>
	<cfinvokeargument	name="user_ID"
				value="#FORM.user_ID#">
</cfif>
<cfinvokeargument	name="user_name"
			value="#Trim(FORM.user_name)#">
<cfinvokeargument	name="CP1"
			value="#Trim(FORM.CP1)#">
<cfinvokeargument	name="CP2"
			value="#Trim(FORM.CP2)#">
<cfinvokeargument	name="OP1"
			value="#Trim(FORM.OP1)#">
<cfinvokeargument	name="OP2"
			value="#Trim(FORM.OP2)#">
</cfinvoke>

<!--- When done go back to user list --->
<cflocation url="einherjar_priority.cfm">


So, the problem is how to make the drop down part of the cfc and stuff. I know how to make a dropdown from a normal query, I just can't get it to work here. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Making a drop down list

#2 Beessipsefs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-March 11

Re: Making a drop down list

Posted 18 March 2011 - 01:14 AM


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1