Getting the contents of an HTML panel

Any way to get the contents of an html panel? Like if you have a panel that has some html in it, is there any way to get the html back out of the panel?

I have tried GetValue() but that returns blank (not nil, just a blank line). I may be using it wrong though.

Post your script

Doesn’t seem like it would be necessary, since it’s just an html panel and setting some html in it… But if you think you need it:

[lua]htmllol = vgui.Create(‘HTML’)
htmllol:SetPos(ScrW()-50,ScrH()-50)
htmllol:SetSize(50,50)
htmllol:OpenURL(“http://google.com”)[/lua]

http:Get

The only problem is that manually going onto another webpage will not update which URL it is getting the HTML code from.

Actually I’m sorry, my example was a bad one, I forgot exactly what I was doing. I am actually doing htmllol:SetHTML(string), and the page generates something and prints it to the html panel, so I can’t use http.Get. Is there no way to just read what the panel contains?

However you’re setting the html of the panel, the particular string, just save it in a variable before you set the panel html.

No, I can’t do that, because when the html is run, it generates something depending and prints it out to the html panel.

[editline]08:42PM[/editline]

Nevermind, if you do it with SetHTML then you can get the result of it by doing file.Read("…/temp_html_page.html")