P.HTML:OpeningURL

From GMod Wiki

Jump to: navigation, search
Function
Syntax P.html"indexa1c8.html" title="String">String URL , String Target (apparently unused), String PostData?, Boolean PostData Set? )
Description:
This function is called when an HTML Panel begins loading a URL. This function may be called several times per "page" due to redirects. See Example below
Returns: nil
In Object: HTML
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=P.HTML:OpeningURL]P.HTML:OpeningURL [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionWhen the Panel begins loading "Loading page" is sent to console
Used onNewerClient.png
Code
pHTML = vgui.Create("HTML", EventManager.Panel)
pHTML:SetSize( 300,500 );
pHTML:OpenURL("http://m.gmail.com")
function pHTML:OpeningURL(url, target)
	Msg("Loading page")
end
Output"Loading page" in console multiple times as the HTML Panel follows a redirect


Additional Notes

String Target appears to always have a length of 0

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox