HtmlViewer output to webtextfield

Hi everybody

I have this code in the opening event of the HtmlViewer that display latitude e longitued when event fire.

var latlong as String

"<p id='demo'></p>"+_
"if (navigator.geolocation) {"+_
"} else {"+_
"document.getElementById('demo').innerHTML ="+_
"'Geolocation is not supported by this browser.';"+_
"function showPosition(position) {"+_
"document.getElementById('demo').innerHTML ="+_
"'Latitude: ' + position.coords.latitude + '<br>' +"+_
"'Longitude: ' + position.coords.longitude;"+_

Var output As String
output = latlong

HTMLFile = New WebFile
HTMLFile.Data = output
HTMLFile.MIMEType = "text/html"

Now i need to pass it values to a webtextfield, but i did not find a solution on how to do that.

do you have any suggestions?

Thanks for the help