Xojo Conferences
XDCMay2019MiamiUSA

[MBS] IERunJavaScriptMBS-question (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] DynaPDF GetFieldEx error
Next thread: [MBS] Duplicate classes in MBS plugins


Re: [MBS] FolderChangedNotificationMBS   -   Garth Hjelte
  [MBS] IERunJavaScriptMBS-question   -   Maximilian Tyrtania
   Re: [MBS] IERunJavaScriptMBS-question   -   Christian Schmitz

[MBS] IERunJavaScriptMBS-question
Date: 29.04.14 16:17 (Tue, 29 Apr 2014 17:17:18 +0200)
From: Maximilian Tyrtania
This is my first attempt at using the HTMLviewer.javascript methods. I noticed that there doesn’t seem to be a way to retrieve the result of a javascript call on Windows (as EvaluateJavaScriptMBS is Mac only) and the example „HTMLViewer Get and Set Field“ (in the Win/HTMLviewer windows folder) works (hacks?) around that limitation by assigning a value to document.title using the IERunJavaScriptMBS command and than reading the title via HTMLViewer1.IETitleMBS.

I just wanted to know if there is some limitation to this approach (can I assign really long strings to document.title?) and if there are other ways to obtain the result of aa javascript call on the Windows side.

Best,

Maximilian Tyrtania
http://www.contactking.de

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] IERunJavaScriptMBS-question
Date: 29.04.14 19:08 (Tue, 29 Apr 2014 20:08:08 +0200)
From: Christian Schmitz

Am 29.04.2014 um 17:17 schrieb Maximilian Tyrtania <<email address removed>>:

> This is my first attempt at using the HTMLviewer.javascript methods. I noticed that there doesn’t seem to be a way to retrieve the result of a javascript call on Windows (as EvaluateJavaScriptMBS is Mac only) and the example „HTMLViewer Get and Set Field“ (in the Win/HTMLviewer windows folder) works (hacks?) around that limitation by assigning a value to document.title using the IERunJavaScriptMBS command and than reading the title via HTMLViewer1.IETitleMBS.
>
> I just wanted to know if there is some limitation to this approach (can I assign really long strings to document.title?) and if there are other ways to obtain the result of aa javascript call on the Windows side.

Not sure about the limit. May be limited to some 1000 chars.
Assigning status of window can also work and trigger the HTMLViewer.StatusChanged event.

Sincerely
Christian

--