473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Repost: Manipulating save button based on readonly attribute

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.
Jul 22 '05 #1
3 1648
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">
"Jack" wrote:
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.

Jul 22 '05 #2
Thanks for your help Jit. Howver, it did not work with the changes that you
recommended. Regards.

"JitGanguly" wrote:
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">
"Jack" wrote:
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.

Jul 22 '05 #3
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

"Jack" wrote:
Thanks for your help Jit. Howver, it did not work with the changes that you
recommended. Regards.

"JitGanguly" wrote:
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">
"Jack" wrote:
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.

Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
1
by: Jack | last post by:
Hi, I have a asp page where a checkbox, when clicked will disable all text boxes associated with the page. The following is a part of a code for the checkbox with its name and readonly...
3
by: Roy Adams | last post by:
Hi I'm reposting this question because for some reason can't post follow up question to this thread. What I'm trying to do is put the value and text from a a select in to a text field and to a...
3
by: ewitkop90 | last post by:
Here is my code: <SCRIPT> function transportchange(transport) { if (framenewinstall.Helpdesk.checked) framenewinstall.Helpdesk.checked=false; if (framenewinstall.CircuitNumber.checked)...
2
by: Learning SQL Server | last post by:
Forgive the repost, but this is really troublesome and I hope SOMEONE can shed some light on it. I am trying to update a datarow via in-place editing from a dataset stored in session. When I...
5
by: Adrian Parker | last post by:
I've got the standard SqlCacheDependency working just fine , ie. I've defined (and encrypted) the connectionStrings section in the web.config, and I've also defined an an sqlCacheDependency in the...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
3
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
1
by: kiranbabu | last post by:
<html> <head> <style type="text/css"> h2{color:#A02820} </style> </head> <script language=javascript>
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.