disabled input box bug????

T

Tariq Ahmad

hi,

i have a textbox into which i insert a value using
javascript and then disable (again using
javascript).

when i post the page back to itself and look at
the .Text property of the textbox it comes back
as blank!

any ideas please?

thnx.

t.
 
B

Bhaskardeep Khaund

Hi,

Its because, when u disable a text box, and u try to request its value it wont come. So instead of disabling it, make it readonly.

Regards,
Bhaskardeep Khaund
hi,

i have a textbox into which i insert a value using
javascript and then disable (again using
javascript).

when i post the page back to itself and look at
the .Text property of the textbox it comes back
as blank!

any ideas please?

thnx.

t.
 
T

Tariq Ahmad

ok, so how can i use javascript to make the
textbox readonly?

i will try: document.formname.textbox.readonly = true;

thanks for ur help.

t.

Hi,

Its because, when u disable a text box, and u try to request its value it
wont come. So instead of disabling it, make it readonly.

Regards,
Bhaskardeep Khaund
hi,

i have a textbox into which i insert a value using
javascript and then disable (again using
javascript).

when i post the page back to itself and look at
the .Text property of the textbox it comes back
as blank!

any ideas please?

thnx.

t.
 
M

Munsifali Rashid

You could also try:

document.formname.textbox.onkeydown = function x() { return false; };
document.formname.textbox.onkeyup = function x() { return false; };

Mun
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top