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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show a button on a page based on query results

Status
Not open for further replies.

malibu65k

Programmer
Sep 27, 2004
131
US
I need to show a button on a page depending on query results. This is already existing code I am trying to modify. Is the following example correct?

Thanks in advance...



<td bgcolor="#FFFFFF"><div align="center">

<cfif UserID.Name is “ABC” OR UserID.Name is “XYZ” OR UserID.Name is “XOXO”> *****I'm concerned with where to place my cfif in the code and the </cfif>**** <input name="Submit" type="submit" id="Submit" value="Close">
</cfif>

<font size="3" face="Tahoma, Arial, sans-serif">
<input name="stknum" type="hidden" id="stknum" value="<cfoutput>#session.edrnum#</cfoutput>">
</font>
<input name="subemail" type="hidden" id="subemail" value="<cfoutput>#session.subemail#</cfoutput>">
<input type="hidden" name="MM_UpdateRecord" value="submitted">
</div></td>
 
Yeah, I don't see a problem with where your cfif block is. All you are doing is hiding/displaying the submit button based on UserID.Name
Code:
<td bgcolor="#FFFFFF">
	<div align="center">
		<cfif UserID.Name is "ABC" OR UserID.Name is "XYZ" OR UserID.Name is "XOXO">
			<input name="Submit" type="submit" id="Submit" value="Close">
		</cfif>
		<font size="3" face="Tahoma, Arial, sans-serif">
		        <input name="stknum" type="hidden" id="stknum" value="<cfoutput>#session.edrnum#</cfoutput>">
		</font>
		<input name="subemail" type="hidden" id="subemail" value="<cfoutput>#session.subemail#</cfoutput>">
		<input type="hidden" name="MM_UpdateRecord" value="submitted">
	</div>
</td>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top