In my tests, the last sentence of this description is not quite accurate: I find that if the clicked HTML element doesn't have an id, the message is not sent at all--at least I cannot detect it. I have this in the card stack where the revBrowser is instantiated:The browserClick message is sent to the current card of a stack containing a browser object when the mouse is clicked in the browser.
The instanceId is the integer identifier of the browser object
The elementId is the id of the html element that was clicked
The browserClick message is only sent if advanced browser messages are turned on. To turn on advanced browser messages use the following command:
revBrowserSet <instanceId>, "messages", "true"
The browserClick message is currently only available on Windows.
The id of an html element is the element's "id" attribute. For example <div id="navbar">. As this attribute is optional in most cases, not all html elements will have an id. If the html element that the mouse was clicked over does not have an id, then the elementId parameter will be empty.
Code: Select all
on browserClick pBrowserID, pElementID --this message is sent only in Windows
answer "You clicked HTML element whose ID is " & pElementID & " in browser " & pBrowserID
end browserClick
If I'm misinterpreting something here, perhaps someone will correct me.
sp27