Need help in accessing properties on Style object in Mozilla./Firefox
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jangs_m
Posted On:   Saturday, April 26, 2008 06:32 AM

I am making use of the style object in HTML like style={currency:1;upperCase=true}.
I access this in the Javascript for validation using form.element.style.currency etc etc.


In IE in works fine and I have no issues.
However, in Firefox/Mozilla, I am getting the value as 'undefined' and hence all my validations fail.


I tried to modify the code to use form.element.getAttribute('style'). But still I am not able to read the properties currency & uppercase.


I have not been able to find a solution for this.
Any help is highly appreciated.

Re: Need help in accessing properties on Style object in Mozilla./Firefox

Posted By:   Firat_Tiryaki  
Posted On:   Tuesday, April 29, 2008 06:08 AM

Suppose that you have a form named "form1" and an input text named "text1", then you can access to the style property like below;



document.form1.text1.style;



or you can change the color

document.form1.text1.style.color="red"

About | Sitemap | Contact