×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Show a button on a page based on query results

Show a button on a page based on query results

Show a button on a page based on query results

(OP)
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>

RE: Show a button on a page based on query results

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 --> coldfusion

<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> 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close