473,407 Members | 2,598 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,407 software developers and data experts.

Hide a button

CJA
Hi

I have a query that checks one field against another and the recordset is
not displayed if they are equal. What I need is to hide a 'proceed' button
if the recordset is empty. Any ideas?

CJA
Jul 19 '05 #1
5 2126
<%
...
if not rs.eof then response.write "<input type=button>"
...
%>

--
http://www.aspfaq.com/
(Reverse address to reply.)


"CJA" <cj*****@yahoo.co.uk> wrote in message
news:Xn********************************@194.168.22 2.124...
Hi

I have a query that checks one field against another and the recordset is
not displayed if they are equal. What I need is to hide a 'proceed' button if the recordset is empty. Any ideas?

CJA

Jul 19 '05 #2
CJA
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in
news:uO**************@TK2MSFTNGP10.phx.gbl:
<%
...
if not rs.eof then response.write "<input type=button>"
...
%>


Thanks for that but I am still having problem. The button calls a
javascript function and I can not seem to get it to work.

This is what the script for the current button looks like:
<input type="button" value="Enrol" name=button2 onClick="return OnButton2
();">

CJA

Jul 19 '05 #3
Looks like you haven't specified the ID attribute.

CJA wrote:
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in
news:uO**************@TK2MSFTNGP10.phx.gbl:

<%
...
if not rs.eof then response.write "<input type=button>"
...
%>


Thanks for that but I am still having problem. The button calls a
javascript function and I can not seem to get it to work.

This is what the script for the current button looks like:
<input type="button" value="Enrol" name=button2 onClick="return OnButton2
();">

CJA


Jul 19 '05 #4
What on earth does "can not seem to get it to work" mean?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"CJA" <cj*****@yahoo.co.uk> wrote in message
news:Xn********************************@62.253.162 .203...
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in
news:uO**************@TK2MSFTNGP10.phx.gbl:
<%
...
if not rs.eof then response.write "<input type=button>"
...
%>


Thanks for that but I am still having problem. The button calls a
javascript function and I can not seem to get it to work.

This is what the script for the current button looks like:
<input type="button" value="Enrol" name=button2 onClick="return OnButton2
();">

CJA

Jul 19 '05 #5
CJA
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in
news:uj**************@TK2MSFTNGP10.phx.gbl:
What on earth does "can not seem to get it to work" mean?


Sorry I was not clear enough. I have now solve it.

<% If Not Rs_courses.EOF Or Not Rs_courses.BOF Then %>
<input type="button" value="Enrol" name=button2
onClick="return OnButton2();">
<% End If

CJA
Jul 19 '05 #6

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

Similar topics

2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
5
by: dje | last post by:
In the OnClick event on a radioButtonList, I run a javascript to show/hide the appropriate div along with a submit button, which displays as expected. The problem is the submit no longer works on...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
1
by: shapper | last post by:
Hello, I created an Asp:Repeater where I have an Asp:Panel and an Asp:Label. In each record of the repeater I want to have a small button which hides or shows the panel in that record. If...
3
by: Bubu | last post by:
It's possible to hide or show e div from a iFrame page with javascript? If yes, please can anyone tell me how to do this? Thanks Bubu
3
by: toodi4 | last post by:
I'm using a javascript that hides and unhides text based on a button click. It works great across static fields on a form. The problem I have is that I'm trying to hide and unhide various fields...
6
by: michael941 | last post by:
Hi, I have 2 tables in an html page. I have div them separately and id them as id1 and id2. I have a link there. What I need is click the link to hide one table and show the other and verse when...
5
by: xrado | last post by:
when i say window.hide(), window dont hide imidetly i want to hide it for a few seconds, do something and then show it back how can i do this? i have this example: import pygtk,time...
18
by: Liquidtouch | last post by:
I have been searching on this for awhile and cant find anything and playing around with it got me no where. I will start with what I am after and then explain what I have. I have a table with 3...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.