Get html codesource

Hi everyone,
I’m trying to get the html source code from a webpage… with “HTML Viewer” and passing the result by document.title
I know that the Windows.status doesn’t work anymore and i don’t have time to learn the Get/post fonction ( Website with login then navigate )
The strange part is that my code works only if i show up the result in a MessageBox before the array
If i don’t display each result in a messagebox… the array save the the first result repeatedly
Not following the repeat variable " i "

for i as integer = 0 to 2
htmTest.ExecuteJavaScript"document.title = document.getElementsByTagName(‘A’)["+str(i)+"].innerHTML;"
myNewTitle = str(newtitletext)
//MessageBox (myNewTitle)
MyArray.Append(myNewTitle)
next

I’ve even tried to make pause between each loop… it doesn’t work neither
Any idea
Thanks

Don’t know if this helps, but have a look at the 6th post in this topic by shao sean.

Code is similar to yours, but there are some slight differences.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.