HTMLViewer Capabilities & options

Greetings,
Is there a way to get the source of the page with HTML Viewer and to alter it and to refresh it back in the viewer ?

I have the following workflow and I need to know if it can be done using HTMLViewer or something else.

  1. Load a page;
  2. If not Logged it, then login (Here is possible to interact form XOJO to input the username and password and hit Login button ?);
  3. Fill the form and press submit button (Here is there a way to know when that submit button was pressed ? )
  4. Page refreshes with the right answer (here I need to strip the rest of the buttons on the form and to show only the final result. )

WHY ? because I need to use this service but the problem is that the service allows multiple submissions within the interface and I need to be able to restrict that and to initiate each time from the app only and get feedback after each submission.

The solution should work on MAC and Windows as well.

Any ideas or help would he highly appreciated.

Thanks in advance.

This question already have been submited here.

Use the page url and doswnload it (HTTPSocket ?).
Then load it from disk,
make the changes,
save the new version to disk
Reload the new version.

You can use MBS Plugin functions to run javascript and do various things.

see HTMLViewer JavaScript communication for Xojo

[quote=460617:@Christian Schmitz]You can use MBS Plugin functions to run javascript and do various things.

see HTMLViewer JavaScript communication for Xojo[/quote]
Thanks Christian,

I did find few useful parts on your plugin and did sent an email regarding the rest of the concerns and possible solutions.

Thanks again.

[quote=460608:@Emile Schwarz]This question already have been submited here.

Use the page url and doswnload it (HTTPSocket ?).
Then load it from disk,
make the changes,
save the new version to disk
Reload the new version.[/quote]
It will not work in this case as the form has to be validated and it is an online service so local version does not work in my case.

Thanks.

Do you have write permissions to the web server (called the service) ?

If the server has an API, you could design your app to do the transactions with the server in the background through an URLConnection.

http://documentation.xojo.com/api/networking/urlconnection.html

That way you do away with the HTMLViewer entirely. No need for JavaScript, everything happens within your app.

1 Like

[quote=460760:@Michel Bujardet]If the server has an API, you could design your app to do the transactions with the server in the background through an URLConnection.

http://documentation.xojo.com/api/networking/urlconnection.html

That way you do away with the HTMLViewer entirely. No need for JavaScript, everything happens within your app.[/quote]
Well there are API’s to do a part of the transactions but the ones I need have to be done from the interface unfortunately, so that part I cannot skip it and no, I don’t have access to the server side as it is a public/private service that I need to use.

thanks.

So, apparently as reply from the company that we tried to work with , they told us that they prepared the page in such a way that if we run the page in iframe then the needed controls and parts of the page will not be visible anymore.

Any idea how I can run a url in iframe using HTMLViewer ? is even that possible ?

Any sample code would be useful.

Thanks again.

Seeing the details about that on the internet I guess I have to create an html file, then replace the url in it and then load it with LoadPage.

I guess this part failed , maybe they have some protections on the page, any other ideas ?

Thanks.

I don’t understand your issue, here. Desktop HTMLViewer is not an iframe.

Would you be talking about WebHTMLViewer ? That one is indeed an iFrame.

Start reading here what an iframe is:

https://en.wikipedia.org/wiki/HTML_element#Frames