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

L

Lisa Calla

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top