hi friends..
please help me with this little code...

i have a html form with a few text boxes and a drop down menu....
On page load I want to blur the drop down menu...

I have blurred the text boxes using

document.getElementById['id-of-text-box'].blur();

i tried the same for select element (drop down menu)
but it aint working...
if someone could let me know or point me to some article it will be of reat help...

thank you in advance!!

Recommended Answers

All 5 Replies

What do you mean by blur, do you mean so the user just can't click it? if you do just do

document.getElementById['id-of-select-box'].disabled=true;

Although I think I might be missing your point entirely.

Member Avatar for diafol

Don't encourage him. Move this to the js forum.

sorry!! next time onwards will post in the right forum...

thank you Gerbiler!! that worked...

Member Avatar for diafol

Mark this solved then.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.