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

    Hi;
    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?

    Thanks
     
    Lisa Calla, Nov 9, 2004
    #1
    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.
Similar Threads
  1. Stewart
    Replies:
    1
    Views:
    446
    Steve C. Orr, MCSD
    Sep 11, 2003
  2. Luke Dalessandro
    Replies:
    0
    Views:
    758
    Luke Dalessandro
    Jan 15, 2006
  3. zxo102
    Replies:
    0
    Views:
    574
    zxo102
    Aug 1, 2006
  4. Replies:
    3
    Views:
    398
    Matthew
    Dec 20, 2008
  5. Chuck
    Replies:
    0
    Views:
    392
    Chuck
    Jul 5, 2003
  6. bbxrider

    location of asp text vs html text

    bbxrider, Jul 6, 2003, in forum: ASP General
    Replies:
    2
    Views:
    173
    bbxrider
    Jul 6, 2003
  7. Replies:
    2
    Views:
    311
  8. Alex Bird
    Replies:
    3
    Views:
    407
    Thomas 'PointedEars' Lahn
    May 9, 2008
Loading...