lehula Posted July 19, 2007 Share Posted July 19, 2007 I've been searching the web for a good example on how to use getAttribute() for php, but I can't find one. I found one, but it was talking about loading a file and nodes and a class...... Can I just use getAttribute to easily get the colors and height and width of this div. Or is there another way to put them in an array. Any help at all would be appreciated. Thanks. <div id="test" style="position:absolute; background-image:url("http://"); left:484; top:568; overflow:auto;background-color:; color: FFFFFF; height:400; width:300;font-size:16pt; text-align: center; font-family:Monotype Corsiva;border-color:000000; border-width:6px; border-style: solid;z-index:2px; background-repeat:repeat; background-position:top left; opacity:1; filter: alpha(opacity=100)"></div> Link to comment Share on other sites More sharing options...
phat_hip_prog Posted July 19, 2007 Share Posted July 19, 2007 Don't you generate this 'CSS' code with php and before it's served to the client it doesn't really mean anything. Once the client browser has it you use javascript to handle... Or am I off target of what you trying to do? Link to comment Share on other sites More sharing options...
thefortrees Posted July 19, 2007 Share Posted July 19, 2007 That is javascript you are talking about Link to comment Share on other sites More sharing options...
phat_hip_prog Posted July 19, 2007 Share Posted July 19, 2007 But before it's sent to the client it's just a string not active code, surely? Link to comment Share on other sites More sharing options...
dbo Posted July 19, 2007 Share Posted July 19, 2007 What are you trying to accomplish? Don't get too set on getAttribute being what you need to do (this is javascript), because there are probably other alternatives. Link to comment Share on other sites More sharing options...
lehula Posted July 19, 2007 Author Share Posted July 19, 2007 I did a search on the best way to get attritubes from an object and one of the suggestion was getAttribute(). It says its a php function. not just javascript Link to comment Share on other sites More sharing options...
phat_hip_prog Posted July 19, 2007 Share Posted July 19, 2007 I see what you mean. It looks like you evaluate the code by creating a (DOM) document model and then query it. All the examples I found are refering to xml (however documentation does infer css, js etc). What are you wanting to use it for? Link to comment Share on other sites More sharing options...
Barand Posted July 19, 2007 Share Posted July 19, 2007 As you've opened another topic on this subject I'm closing this one. Don't want people wasting time giving the same answers in two places. Don't double post. Link to comment Share on other sites More sharing options...
Recommended Posts