PDA

View Full Version : method for read html code



TAG
14 Sep 2009, 2:32 AM
Hello,
I have a little question, I have this html code:


...
<div id="pippo">
<br>
<p>bla bla bla bla </p>
<p>bla bla bla bla </p>
<img src="pippo.jpg">
</div>
...


In my function I would read the code Html....



...
var readHTML=function(){
var readCode=Ext.get('pippo');//this takes the code and return Ext.Element
alert(readCode.html);//DANGER ERROR.....but I do not know how to display HTML code
}


for to show the html code, which method should I use?

Please could you suggest how to read the html code?

Animal
14 Sep 2009, 2:42 AM
This is not an Ext issue.

This is a basic knowing what you are doing issue: http://w3schools.com/html/default.asp

TAG
14 Sep 2009, 3:07 AM
ok....

I would need to read the HTML code to be able to display in alert.....

Condor
14 Sep 2009, 3:49 AM
alert(readCode.dom.innerHTML);