Jump to content

[SOLVED] HTML DOM Select blur() question


dbillings

Recommended Posts

Say you have a form with 10 select lists. Is there a way to blur() all select boxes with one line of code?

 

So replace...

 

document.formname.selectName1.blur()

document.formName.selectName2.blur()

document.formName.selectName3.blur()

etc...

 

with...

 

document.formName.something to refer to all select fields.blur()

 

I'm not sure if that makes sense or if there is a short cut to blur all of one field type in a give form. Thanks for any help with this.

Link to comment
https://forums.phpfreaks.com/topic/180346-solved-html-dom-select-blur-question/
Share on other sites

How could they all have focus at once?  If you want to remove focus from anywhere, set the focus to something specific and then blur that.  AFAIK you can't focus on more than one object...

 

http://www.java2s.com/Code/JavaScriptReference/Javascript-Methods/blurSyntaxParametersandNote.htm

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.