browserLoadRequest

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
browserLoadRequest <pUrl>, <pType>
Summary

Sent when a URL has been requested.

Introduced4.5.3
OSios
Platformsmobile
Parameters
NameTypeDescription
pUrl

The URL that has started to load.

pType

The reason for the request. - "click" - "submit" - "navigate" - "reload" - "resubmit" - "other"

Example
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
RelatedCommand: mobileControlCreate, mobileControlDelete, mobileControlSet
Function: mobileControlGet, mobileControlTarget, mobileControls
Message: browserStartedLoading, browserLoadFailed, browserFinishedLoading
Description

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 mobile 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(command) has been set to true.

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

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