473,624 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_IsCheck ed) = "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 1655
Take the double quotes off from FALSE and try

<%If ( cbool(l_IsCheck ed) = 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_IsCheck ed) = "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_IsCheck ed) = 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_IsCheck ed) = "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.Reme mber 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_IsCheck ed) = 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_IsCheck ed) = "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
3182
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 to code a solution to this it'll probably be done in ASP on a web server, unless there's a significantly better way. I'm looking for a way to create over 100 Excel *charts* programmatically.
1
1454
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 attributes. name="chk_Complete" <%= isReadOnly %> I have to disable(or make sure does not disaplay) a save button in the same page when this checkbox's attribute is readonly. I have no idea how to do
3
2194
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 hidden field respectfully and the value from dynamically created hidden fiields in to a text fieldin to a text field all at the same time Here's the code as viewed through the browser <body bgcolor="#FFFFFF" text="#000000" > <SCRIPT...
3
2350
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) framenewinstall.CircuitNumber.checked=false; switch (transport) { case 0: Helpdesk.innerText="No Info Needed";
2
1862
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 try to write the new value into the selected row, I always get the following error : Column is read-only. in my UpdateCommand event I have:
5
2432
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 caching section. So, in my code I add an item to the cache with an sqlCacheDependency, referencing the named sqlCacheDependency in the web.config and the database table it is to be based on (have enabled notificiations for that table). Fine. ...
8
3656
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 and save it to a file. This step is not to hard however the contents of the textarea is mostly latex source so it contains just about every special character you can imagine. My question is this, how do I save an exact copy of the textarea...
3
3665
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 html is: <a class="searchsavechanges btn btn3d tbbtn" href="javascript:" style="position:static"> <div id="TBsearchsavechanges">Search</div> </a>
1
2275
by: kiranbabu | last post by:
<html> <head> <style type="text/css"> h2{color:#A02820} </style> </head> <script language=javascript>
0
8173
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8475
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.