Skip to main content
Oct 19, 2007 3:32 PM UTC
Question

Disabling link depending on row contents

I have a repeating row and the last column is a button that lets the user perform an action (in this case, they are able to create a reply message). I want to deactivate the button in some cases, usually if the row is from a user of a certain type, which I can determine from a variable. Is there a way to deactive a button depending on a variable state?

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Oct 19, 2007 8:25 PM UTC
>I have a repeating row and the last column is a button that lets the user
> perform an action (in this case, they are able to create a reply message).
> I
> want to deactivate the button in some cases, usually if the row is from a
> user
> of a certain type, which I can determine from a variable. Is there a way
> to
> deactive a button depending on a variable state?


What language? When you say 'button', do you mean 'hyperlink'?

ASP/VBSCRIPT:

<% If varSomeVariable = "this" Then %>
<a href="page.asp">Create a reply message</a>
<% ElseIf varSomeVariable = "that" or varSomeVariable = "the other" Then %>
<p>Sorry, your variables are wrong!</p>
<% End If %>

Translate
Oct 19, 2007 9:22 PM UTC
Sorry, PHP. Any help with formatting rows in repeating regions and enabling/disabling a link on the row (in this case it's a "reply" link as the last column.
Translate