var allDivs = document.getElementsByTagName('div'); for (var i=0; i< allDivs.length; i++) { if (allDivs.className.indexOf('goal_icon_holder') != -1) { allDivs.onblur = function() { alert('test'); } allDivs.onclick = function() { alert('test'); } } }
Onblur Fails... Onclick works?!
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Onblur Fails... Onclick works?!
Why won't onblur work? onclick works!
Re: Onblur Fails... Onclick works?!
perhaps divs don’t have focus events, it would not make much sense.
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Re: Onblur Fails... Onclick works?!
perhap you are right... in fact you are correct.jacek wrote:perhaps divs don’t have focus events, it would not make much sense.
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Re: Onblur Fails... Onclick works?!
I finally fixed my awful JS problem... 7 days later err
Re: Onblur Fails... Onclick works?!
Good news JavaScript does tend to be a bit horrid.unemployment wrote:I finally fixed my awful JS problem... 7 days later err