Capture webhtmlviewer

i want read from htmlviewer to textarea, i tray this:
me.ExecuteJavascript “document.getElementById(’” + TextArea1.ControlID + “_inner’).value = document.getElementById(’” + HTMLViewer1.ControlID + “_inner’).value;”

why cannot run that sript?
the message error is:
Could not execute returned javascript: Cannot read property ‘value’ of null
Source: document.getElementById(‘AkvnTAV7_inner’).value = document.getElementById(‘JmG4hnqe_inner’).value;

[quote=131632:@husnul yaqin]i want read from htmlviewer to textarea, i tray this:
me.ExecuteJavascript “document.getElementById(’” + TextArea1.ControlID + “_inner’).value = document.getElementById(’” + HTMLViewer1.ControlID + “_inner’).value;”

why cannot run that sript?
the message error is:
Could not execute returned javascript: Cannot read property ‘value’ of null
Source: document.getElementById(‘AkvnTAV7_inner’).value = document.getElementById(‘JmG4hnqe_inner’).value;[/quote]

Greg will tell you not to hack the DOM this way. Furthermore, the WebHTMLViewer is not a regular control, it is an iFrame. So it has no Value property. Besides, if you change the value of a TextArea in the DOM through JavaScript, you will never be able to retrieve it through it’s Text property, since it does not exist on the server.

If you want to get the HTML source of a WebHTMLViewer, simply use an HTTPSocket to retrieve its URL content.

why i use webhtmlviewer? because can not get the source when use httpsocket, some web cannot access when use httpsocket, only can show in webhtmlviewer

Look into the /Extra/WebSDK folder of Xojo, the WebControlSDK.pdf will give you insight into the WebControlWrapper you can use to create your own viewer and be able to get the source.