theniteowl
Programmer
Hi All,
I am trying to read the inline style for form elements.
I am retrieving the form elements like this:
var elArr = objForm.elements;
I first want to test if the current element has an inline style but it always seems to test true as if it IS true even if no parameters are set.
I then want to get all the parameters of the style property or even better a string including all that are set.
I can do this:
var mystyle = elArr.style;
var myfont = mystyle.fontFamily;
But I would have to specifically name every attribute I am looking for and that get's cumbersome.
I seem to be able to get at the style as if it were a collection but I cannot access it like an array that I can iterate through or even check the length of.
Is there any way to do this? Preferably just pulling it like a string?
Paranoid? ME?? WHO WANTS TO KNOW????
I am trying to read the inline style for form elements.
I am retrieving the form elements like this:
var elArr = objForm.elements;
I first want to test if the current element has an inline style but it always seems to test true as if it IS true even if no parameters are set.
I then want to get all the parameters of the style property or even better a string including all that are set.
I can do this:
var mystyle = elArr.style;
var myfont = mystyle.fontFamily;
But I would have to specifically name every attribute I am looking for and that get's cumbersome.
I seem to be able to get at the style as if it were a collection but I cannot access it like an array that I can iterate through or even check the length of.
Is there any way to do this? Preferably just pulling it like a string?
Paranoid? ME?? WHO WANTS TO KNOW????