htmlLoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 69: Line 69:
<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>
</dl>
<!-- DISCONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 7, 2015 - 22:03 (UTC)</dd>
<dt class="note">[[User:Tupolov|Tupolov]]</dt>
<dd class="note">
In order to use URLs, they must be included in CfgCommands -> allowedHTMLLoadURIs. In order to use URIs with params a wildcard * character is supported
<br><br>
'''Script Example''':
<br>
<nowiki>_newsOnline = "http://alivemod.com/alive_news.php?map=" + _map + "&mission=" + _mission + "&player=" + _player</nowiki>;<br>
<nowiki> _ctrlHTML htmlLoad _newsOnline;</nowiki><br><br>
'''Config Example:'''<br>
<nowiki>class CfgCommands {</nowiki><br>
<nowiki>  allowedHTMLLoadURIs[] += {</nowiki><br>
<nowiki>      "http://alivemod.com/alive_news.php*";</nowiki><br>
<nowiki>  };</nowiki><br>
<nowiki>}</nowiki>;<br>
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 00:03, 8 October 2015

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Load HTML from file to given control. File path is relative to current mission dir or an absolute path (with drive letter etc.).
Groups:
Uncategorised

Syntax

Syntax:
control htmlLoad filename
Parameters:
control: Control
filename: String
Return Value:
Nothing

Examples

Example 1:
_control htmlLoad "briefing.html";
Example 2:
_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";//[1]

Additional Information

See also:
ctrlHTMLLoadedloadFilepreprocessFilepreprocessFileLineNumbers

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

Notes

Bottom Section

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
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*";
};
};