output text in control location; calling control javascript from page javascript

Discussion in 'ASP .Net Building Controls' started by Lisa Calla, Nov 9, 2004.

  1. Lisa Calla

    Lisa Calla Guest

    If you don't know, I'm just learning javascript and aspnet, but I have a
    pretty good grounding in windows programming.

    I'm trying to build a better edit control. The light grey text when a
    textbox is disabled is difficult for some of my users to read. My first
    attempt was based on a textbox and a label. When enabled, the textbox
    should be visible, and when disabled, the label should be visible and the
    textbox not. Easily done in code-behind, but more difficult client side.

    I think a better approach would be when disabled, the textbox is hidden, and
    the text property is simply written out to the page in the location of the
    control. When enabled, the textbox is shown. I can hide and show my
    textbox, but I'm stumped on the client side writing of the text at the
    control location. Any tips?

    2nd part: Since I have a collection of these controls, I can call a
    function with ctl1.disable, ctl2.disable, etc (where disable is the
    control's client side function) from client side code in the hosting page,
    but my disable function is never called. How do you invoke the control's
    javascript function from javascript in the hosting page?

    Lisa Calla, Nov 9, 2004
    1. Advertisements

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.

Share This Page