Repost: Manipulating save button based on readonly attribute

J

Jack

Hi,
I am trying to use the following code to make the save button invisible in
the asp form when the checkbox is either on or the session variable has a
particular value.
THE CODE IS AS FOLLOWS:

<%If ( cbool(l_IsChecked) = "FALSE" ) or (session("sess_FiscalFirst") <>
"Y") then%>
<input type="submit" value="Save" name="btn_Save">

<%End If%>

In the above, my logic is if the value of the checkbox is not true or the
value of the session variable is not Y then only show the SAVE button.
However this is not happening. I find that when the second part or the first
part is not there, the logic goes fine i.e. the logic holds with only the
first condition or the second condition itself but not with the or syntax.
Not sure why. Any help is appreciated. Thanks.
 
J

JitGanguly

Take the double quotes off from FALSE and try

<%If ( cbool(l_IsChecked) = FALSE ) or (session("sess_FiscalFirst") <>
"Y") then%>
<input type="submit" value="Save" name="btn_Save">
 
J

Jack

Thanks for your help Jit. Howver, it did not work with the changes that you
recommended. Regards.
 
J

JitGanguly

Ok Jack. Thats means its not meetign the conditions.Remember 1 false+1 true
would give you false , only a true, trur will give you true.So make sure the
values are right by doign a response.write
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top