enable/disable question

Discussion in 'ASP .Net' started by Dave, Sep 15, 2010.

  1. Dave

    Dave Guest

    Is it possible to disable the something like below? I dont see an
    enabled property...

    ////////////////////////////////////////////////

    <a id="FurtherActionHyperlink" href="#"
    onclick="window.open('SORFollup.aspx?SORID=<%# Eval("SORID") %>', '',
    'toolbar=0, height=320,width=375,resizable=0,scrollbars=0');return
    false">
    Further Action</a>


    //////////////////////////////////////////////

    if not, any suggestions on how to try launching a popup in the same
    manner?

    Thanks
     
    Dave, Sep 15, 2010
    #1
    1. Advertising

  2. Dave

    Cubaman Guest

    On Sep 15, 2:07 am, Dave <> wrote:
    > Is it possible to disable the something like below?  I dont see an
    > enabled property...
    >
    > ////////////////////////////////////////////////
    >
    > <a id="FurtherActionHyperlink" href="#"
    > onclick="window.open('SORFollup.aspx?SORID=<%# Eval("SORID") %>', '',
    > 'toolbar=0, height=320,width=375,resizable=0,scrollbars=0');return
    > false">
    > Further Action</a>
    >
    > //////////////////////////////////////////////
    >
    > if not, any suggestions on how to try launching a popup in the same
    > manner?
    >
    > Thanks


    Try with javascript.
    document.getElementById('<%FurtherActionHyperlink.ClientId
    %>').disabled = true;

    Best regards.
     
    Cubaman, Sep 15, 2010
    #2
    1. Advertising

  3. Dave

    Dave Guest

    Sorry, please be a little more specific. I don't know Java. I did
    neglect to say that I need to be able to disable it in C#;conditional
    on checkbox control.









    On Sep 15, 3:00 am, Cubaman <>
    wrote:
    > On Sep 15, 2:07 am, Dave <> wrote:
    >
    >
    >
    >
    >
    > > Is it possible to disable the something like below?  I dont see an
    > > enabled property...

    >
    > > ////////////////////////////////////////////////

    >
    > > <a id="FurtherActionHyperlink" href="#"
    > > onclick="window.open('SORFollup.aspx?SORID=<%# Eval("SORID") %>', '',
    > > 'toolbar=0, height=320,width=375,resizable=0,scrollbars=0');return
    > > false">
    > > Further Action</a>

    >
    > > //////////////////////////////////////////////

    >
    > > if not, any suggestions on how to try launching a popup in the same
    > > manner?

    >
    > > Thanks

    >
    > Try with javascript.
    > document.getElementById('<%FurtherActionHyperlink.ClientId
    > %>').disabled = true;
    >
    > Best regards.- Hide quoted text -
    >
    > - Show quoted text -
     
    Dave, Sep 15, 2010
    #3
  4. Dave

    Cubaman Guest

    On Sep 15, 12:15 pm, Dave <> wrote:
    > Sorry, please be a little more specific.  I don't know Java.  I did
    > neglect to say that I need to be able to disable it in C#;conditional
    > on checkbox control.
    >
    > On Sep 15, 3:00 am, Cubaman <>
    > wrote:
    >
    > > On Sep 15, 2:07 am, Dave <> wrote:

    >
    > > > Is it possible to disable the something like below?  I dont see an
    > > > enabled property...

    >
    > > > ////////////////////////////////////////////////

    >
    > > > <a id="FurtherActionHyperlink" href="#"
    > > > onclick="window.open('SORFollup.aspx?SORID=<%# Eval("SORID") %>', '',
    > > > 'toolbar=0, height=320,width=375,resizable=0,scrollbars=0');return
    > > > false">
    > > > Further Action</a>

    >
    > > > //////////////////////////////////////////////

    >
    > > > if not, any suggestions on how to try launching a popup in the same
    > > > manner?

    >
    > > > Thanks

    >
    > > Try with javascript.
    > > document.getElementById('<%FurtherActionHyperlink.ClientId
    > > %>').disabled = true;

    >
    > > Best regards.- Hide quoted text -

    >
    > > - Show quoted text -


    Hello:
    Java is no javascript ;)
    Ok, I haven't try this code, but should be something like this. In
    your code behind:

    protected void Page_Load(object sender, EventArgs e){
    if(myCheckBox.Cheked){
    ClientScript.RegisterStartupScript(GetType(), "DisableLink",
    "document.getElementById('" + FurtherActionHyperlink.ClientId +
    "').disabled = true;", true);
    }
    }

    By the way:
    http://en.wikipedia.org/wiki/Java_(programming_language)
    http://en.wikipedia.org/wiki/JavaScript
    Best regards.
     
    Cubaman, Sep 16, 2010
    #4
    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. Aliki

    Enable/disable operation

    Aliki, Sep 27, 2004, in forum: VHDL
    Replies:
    1
    Views:
    534
    ivailokroumov
    Sep 28, 2004
  2. buran
    Replies:
    2
    Views:
    1,854
    buran
    Sep 26, 2003
  3. Dave Caton
    Replies:
    7
    Views:
    8,079
    =?Utf-8?B?SWJyYWhpbSBTaGFtZWVxdWU=?=
    Jul 15, 2004
  4. Patrick
    Replies:
    1
    Views:
    713
  5. Paul
    Replies:
    3
    Views:
    2,938
    bruce barker
    Sep 30, 2008
Loading...

Share This Page