htmlLoad: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">") |
Lou Montana (talk | contribs) m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">") |
||
Line 48: | Line 48: | ||
<br>htmlLoad works with URL's as well as html files. | <br>htmlLoad works with URL's as well as html files. | ||
</dd> | </dd> | ||
<dt><dt> | |||
<dd class="notedate">Posted on September 7, 2014 - 19:35 (UTC)</dd> | <dd class="notedate">Posted on September 7, 2014 - 19:35 (UTC)</dd> | ||
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | <dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | ||
Line 54: | Line 54: | ||
While surprisingly [[htmlLoad]] does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete. Therefore it is not recommended to use this command in such way. | While surprisingly [[htmlLoad]] does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete. Therefore it is not recommended to use this command in such way. | ||
</dd> | </dd> | ||
<dt><dt> | |||
<dd class="notedate">Posted on April 21, 2015 - 18:08 (UTC)</dd> | <dd class="notedate">Posted on April 21, 2015 - 18:08 (UTC)</dd> | ||
<dt class="note">[[User:Benargee|Benargee]]</dt> | <dt class="note">[[User:Benargee|Benargee]]</dt> | ||
<dd class="note">Example use of URL can be found in [[BIS_fnc_GUInewsfeed]] with the function browser. | <dd class="note">Example use of URL can be found in [[BIS_fnc_GUInewsfeed]] with the function browser. | ||
</dd> | </dd> | ||
<dt><dt> | |||
<dd class="notedate">Posted on October 7, 2015 - 22:03 (UTC)</dd> | <dd class="notedate">Posted on October 7, 2015 - 22:03 (UTC)</dd> | ||
<dt class="note">[[User:Tupolov|Tupolov]]</dt> | <dt class="note">[[User:Tupolov|Tupolov]]</dt> |
Revision as of 00:09, 6 April 2021
Description
- Description:
- Description needed
- Groups:
- GUI Control
Syntax
- Syntax:
- Syntax needed
- Parameters:
- control: Control
- filename: String - local file name or remote file URL
- Return Value:
- Return value needed
Examples
- Example 1:
_control htmlLoad "briefing.html";
- Example 2:
_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English"; // link
- Example 3:
- Display news item:
[] spawn { disableSerialization; _html = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscHTML", -1]; _html ctrlSetBackgroundColor [0,0,0,0.8]; _html ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH]; _html ctrlCommit 0; _html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English"; };
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on September 7, 2014 - 18:02 (UTC)
- BrotherhoodOfHam
-
htmlLoad works with URL's as well as html files. - Posted on September 7, 2014 - 19:35 (UTC)
- Killzone Kid
- While surprisingly htmlLoad does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete. Therefore it is not recommended to use this command in such way.
- Posted on April 21, 2015 - 18:08 (UTC)
- Benargee
- Example use of URL can be found in BIS_fnc_GUInewsfeed with the function browser.
- Posted on October 7, 2015 - 22:03 (UTC)
- Tupolov
-
(Arma 3) In order to use URLs, they must be included in CfgCommands -> allowedHTMLLoadURIs. In order to use URIs with params a wildcard * character is supported:
Script Example:_newsOnline = "http://alivemod.com/alive_news.php?map=" + _map + "&mission=" + _mission + "&player=" + _player; _ctrlHTML htmlLoad _newsOnline;
Config Example:
class CfgCommands { allowedHTMLLoadURIs[] += { "http://alivemod.com/alive_news.php*" }; };