Livecode Wiki
Advertisement

Sent when a URL has been requested, only on iOS.

Syntax:

browserLoadRequest <url>, <type>

Examples:

on browserLoadRequest pURL, pType
   answer "Do you want to load:" && pURL with "Yes" and "No"
   if it is "Yes" then
      pass browserLoadRequest
   else
      put "Refused:" && pURL into field "Status"
   end if
end browserLoadRequest

Handle the browserLoadRequest message to perform an action when a URL has been requested.

The browserLoadRequest message is sent to the object containing the script that created the UIWebView browser control after a url has been requested.

Not passing the message causes the load request to not go ahead.

The browserLoadRequest is only sent if delayRequests has been set to true.

Delaying requests can cause web pages that load pages into sub-documents to not work correctly.

The browserLoadRequest message is sent in response to the webView:shouldStartLoadWithRequest: delegate method.

Parameters:

  • url: The URL that has started to load.
  • type (enum): The reason for the request. One of:
    • "click"
    • "submit"
    • "navigate"
    • "reload"
    • "resubmit"
    • "other"
  • Description: Handle the browserLoadRequest message to perform an action when a URLhas been requested.

See also: mobileControlSet (command), mobileControlGet (function), mobileControlTarget (function), mobileControls (function), browserStartedLoading (message), browserLoadFailed (message), browserFinishedLoading (message)

Advertisement