createElement tabIndex

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

createElement tabIndex

Post 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
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: createElement tabIndex

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: createElement tabIndex [SOLVED]

Post 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
Post Reply