Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you List all style properties for object

Status
Not open for further replies.

friendlyposter

Programmer
Nov 1, 2002
61
US


I want to traverse and inspect all current style properties of an object.

If it can be done, please tell me how.



The code I tried to obtain all style properties:


var traceAlerts = new Array(0);
var xmlDoc = xmloceaniframe.document.getElementById("xmlocean");

traceAlerts[1]=('xmlDoc.id=['+xmlDoc.id+']');
traceAlerts[2]=('xmlDoc.style=['+xmlDoc.style+']');
traceAlerts[3]=('xmlDoc.style.display=['+xmlDoc.style.display+']');
traceAlerts[4]=('xmlDoc.style.properties=['+xmlDoc.style.properties+']');
traceAlerts[5]=('xmlDoc.style.attributes=['+xmlDoc.style.attributes+']');
traceAlerts[6]=('xmlDoc.style.elements=['+xmlDoc.style.elements+']');
traceAlerts[7]=('xmlDoc.style.items=['+xmlDoc.style.items+']');
traceAlerts[8]=('xmlDoc.style.value=['+xmlDoc.style.value+']');
traceAlerts[9]=('xmlDoc.style.childNodes=['+xmlDoc.style.childNodes+']');

show.textBox1.value = traceAlerts.join('\n')


The result was:


xmlDoc.id=[xmlocean]
xmlDoc.style=[[object]]
xmlDoc.style.display=[block]
xmlDoc.style.properties=[undefined]
xmlDoc.style.attributes=[undefined]
xmlDoc.style.elements=[undefined]
xmlDoc.style.items=[undefined]
xmlDoc.style.value=[undefined]
xmlDoc.style.childNodes=[undefined]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top