Showing posts with label enables. Show all posts
Showing posts with label enables. Show all posts

Monday, March 26, 2012

Text in textbox enables button.

Hello beginner here.
I've been researching for awhile to find a way to enable a button when
text is entered into a textbox (client side). I working with asp.net
2.0 C#. I've been trying to figure this out through javascript or
someone told me to research Page.RegisterClientScriptBlock Method, but
I can't seem to figure this out. Any help will be appreciated.

ThanksHey.

in your html:
<script>
function blah(textbox,button)
{
button.disabled = textbox.value.length == 0;
}
</script>

in your C# (in page load handler or wherever):

...
this.txtBox.Attributes["onkeyup"] =
string.Format("blah(this,getElementByID('{0}'));",this.btnSubmitOrWhateverItsNameIs.ClientID);
...

Hope this helps.
Kikoz

<hledman@.gmail.comwrote in message
news:1154459595.292991.267130@.i42g2000cwa.googlegr oups.com...

Quote:

Originally Posted by

Hello beginner here.
I've been researching for awhile to find a way to enable a button when
text is entered into a textbox (client side). I working with asp.net
2.0 C#. I've been trying to figure this out through javascript or
someone told me to research Page.RegisterClientScriptBlock Method, but
I can't seem to figure this out. Any help will be appreciated.
>
Thanks
>

Thursday, March 22, 2012

textbox

hello

I need a text box the enables input numbers from right to left. does any
know of such a control?

yoramo.You can achieve this through css:
Put the following between the <HEAD></HEAD> tags in your html view. ( or use
a style sheet )
<style>
..sample {text-align: right;}
</style
In the designer, assign the textbox's "CssClass" = sample;
You should be good to go.

David Young

"yoramo" <yoramo@.[NOSPAM]hotmail.com> wrote in message
news:OGHAhi17DHA.1596@.TK2MSFTNGP10.phx.gbl...
> hello
> I need a text box the enables input numbers from right to left. does any
> know of such a control?
> yoramo.
thats not what i need.
i need to be able to key in numbers from right to left.
example: "123" should be key in '3','2','1'

"dm_dal" <REMOVE_THIS.dmy75252@.yahoo.com> wrote in message
news:eigBSu17DHA.2416@.TK2MSFTNGP10.phx.gbl...
> You can achieve this through css:
> Put the following between the <HEAD></HEAD> tags in your html view. ( or
use
> a style sheet )
> <style>
> .sample {text-align: right;}
> </style>
> In the designer, assign the textbox's "CssClass" = sample;
> You should be good to go.
> David Young
> "yoramo" <yoramo@.[NOSPAM]hotmail.com> wrote in message
> news:OGHAhi17DHA.1596@.TK2MSFTNGP10.phx.gbl...
> > hello
> > I need a text box the enables input numbers from right to left. does any
> > know of such a control?
> > yoramo.
Ok...you want to reverse the order in which the values are typed in?

Let me chew on that a little and I'll get back with you.

David Young

"yoramo" <yoramo@.[NOSPAM]hotmail.com> wrote in message
news:elwLh217DHA.3380@.tk2msftngp13.phx.gbl...
> thats not what i need.
> i need to be able to key in numbers from right to left.
> example: "123" should be key in '3','2','1'
>
> "dm_dal" <REMOVE_THIS.dmy75252@.yahoo.com> wrote in message
> news:eigBSu17DHA.2416@.TK2MSFTNGP10.phx.gbl...
> > You can achieve this through css:
> > Put the following between the <HEAD></HEAD> tags in your html view. ( or
> use
> > a style sheet )
> > <style>
> > .sample {text-align: right;}
> > </style>
> > In the designer, assign the textbox's "CssClass" = sample;
> > You should be good to go.
> > David Young
> > "yoramo" <yoramo@.[NOSPAM]hotmail.com> wrote in message
> > news:OGHAhi17DHA.1596@.TK2MSFTNGP10.phx.gbl...
> > > hello
> > > > I need a text box the enables input numbers from right to left. does
any
> > > know of such a control?
> > > > yoramo.
> >
You may need to create a custom textbox that does some JavaScript
manipulation on the client side. Handling the key events and adding the new
keystroke to the beginning of the existing string. Not being a guru at
JavaScript I can't give you details, but the concept should hold.

-- Jim --

"yoramo" <yoramo@.[NOSPAM]hotmail.com> wrote in message
news:OGHAhi17DHA.1596@.TK2MSFTNGP10.phx.gbl...
> hello
> I need a text box the enables input numbers from right to left. does any
> know of such a control?
> yoramo.