Hide a button

Discussion in 'ASP General' started by Aaron [SQL Server MVP], Jun 29, 2004.

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

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




    "CJA" <> wrote in message
    news:Xns9517C5328E444cjaitkenhotmailcom@194.168.222.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
    Aaron [SQL Server MVP], Jun 29, 2004
    #1
    1. Advertising

  2. Aaron [SQL Server MVP]

    CJA Guest

    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
    CJA, Jun 29, 2004
    #2
    1. Advertising

  3. Looks like you haven't specified the ID attribute.

    CJA wrote:
    > "Aaron [SQL Server MVP]" <> wrote in
    > news::
    >
    >
    >><%
    >> ...
    >> 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
    >
    David C. Holley, Jun 29, 2004
    #3
  4. What on earth does "can not seem to get it to work" mean?

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




    "CJA" <> wrote in message
    news:Xns9517D5BAAC0F5cjaitkenhotmailcom@62.253.162.203...
    > "Aaron [SQL Server MVP]" <> wrote in
    > news::
    >
    > > <%
    > > ...
    > > 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
    >
    Aaron [SQL Server MVP], Jun 29, 2004
    #4
  5. Aaron [SQL Server MVP]

    CJA Guest

    "Aaron [SQL Server MVP]" <> wrote in
    news::

    > <%
    > ...
    > 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
    CJA, Jun 29, 2004
    #5
  6. Aaron [SQL Server MVP]

    CJA Guest

    "Aaron [SQL Server MVP]" <> wrote in
    news::

    > 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
    CJA, Jun 30, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RockNRoll
    Replies:
    1
    Views:
    3,638
    Steve Flitcroft
    Aug 9, 2004
  2. microsoft
    Replies:
    1
    Views:
    2,534
    bruce barker
    Oct 5, 2004
  3. dje
    Replies:
    5
    Views:
    1,690
    =?Utf-8?B?Q2hyaXM=?=
    Dec 2, 2004
  4. Shapper

    Image Button and Show/Hide Panel

    Shapper, Sep 21, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    10,274
    Shapper
    Sep 21, 2005
  5. steven robinson

    How can I hide button border on AWT Button?

    steven robinson, Nov 6, 2003, in forum: Java
    Replies:
    0
    Views:
    937
    steven robinson
    Nov 6, 2003
Loading...

Share This Page