SetWebURL: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetWebURL(web, URL)}} {{FuncParameters}} {{FuncParam|web|__EDIT_ME__}} {{FuncParam|URL|__EDIT_ME__...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the web URL. Not all URLs are whitelisted and might not work.}}


{{FuncSyntax|SetWebURL(web, URL)}}
{{FuncSyntax|SetWebURL(web, URL)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|web|__EDIT_ME__}}
{{FuncParam|web|The web identifier}}
{{FuncParam|URL|__EDIT_ME__}}
{{FuncParam|URL|The URL}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
-- For remote WebUIs:
SetWebURL(webId, "https://google.com")
 
-- For normal local WebUIs:
SetWebURL(webId, "http://asset/mypackage/something.html")
 
-- Since Onset 1.2.2 you can load pages from the game server. The files must be inside the public_html folder.
SetWebURL(webId, "http://server/test/something.html")
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:WebFunctions}}

Latest revision as of 17:30, 28 August 2020

SetWebURL

Type: Function
Context: Client
Introduced: v1.0

Description

Set the web URL. Not all URLs are whitelisted and might not work.

Syntax

SetWebURL(web, URL)

Parameters

  • web
    The web identifier
  • URL
    The URL

Return Value

  • Returns true on success.

Example

-- For remote WebUIs:
SetWebURL(webId, "https://google.com")

-- For normal local WebUIs:
SetWebURL(webId, "http://asset/mypackage/something.html")

-- Since Onset 1.2.2 you can load pages from the game server. The files must be inside the public_html folder.
SetWebURL(webId, "http://server/test/something.html")

See also