Page 1 of 1

createElement tabIndex

Posted: Thu Jan 24, 2008 10:37 am
by kendall
hello,

I am using the createElement and appendChild functions to dynamically create input text fields for a form....
on a for loop in creating the element i am doing :-

Code: Select all

 
inputObject.onchange = checkLetter;
 
// the checker function
function checkLetter (){
    var ele = this;
    var ind = ele.tabIndex;
    alert(this.tabIndex+'/'+this.name);
    var letter = word.charAt(ind);
    var val = ele.value;
....
 
While in FF i am able to retrieve the "tabIndex" of the element field i am NOT able to do so in IE...i am able to retrieve the name however...

...is this a IE bug or is there "another" way that i am to access the tabIndex?

Kendall

Re: createElement tabIndex

Posted: Thu Jan 24, 2008 12:07 pm
by VladSun
I recieve a security alert in IE - when I permit the JS there are no problems (tabIndex is alerted properly), if no - no alert() at all.

Re: createElement tabIndex [SOLVED]

Posted: Thu Jan 24, 2008 12:17 pm
by kendall
actually i need to use

Code: Select all

 
inputObject.tabIndex = i;
 
seems to do the trick


P.S. ....we need a "solved" option to indicate when a topic has been answered correctly