BBjHtmlView::getAutoNavigate

Description

In BBj 19.00 and higher, this method returns a boolean that indicates whether the BBjHtmlView control should automatically navigate to anchor links that the user clicks on.

Syntax

Return Value

Method

boolean

getAutoNavigate()

Parameters

None.

Return Value

Returns a boolean that indicates whether the BBjHtmlView control should automatically navigate to anchor links that the user clicks on.

Remarks

By default, this value is false; the browser will not automatically navigate to clicked anchor links.

Example

rem ' BBjHtmlView::getAutoNavigate

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,600,400,"BBjHtmlView::getAutoNavigate",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
autoNavigate = msgbox("Auto-navigate on anchor clicks?",4+256,"setAutoNavigate")=6
hyperlinkEvents = msgbox("Register for hyperlink events?",4,"Hyperlink Events")=6
html$ = "<html><a href='anchor1'>anchor1</a><br><a href='anchor2' onclick='return false;'>"
html$ = html$ + "anchor2 (cancel)</a><br><a href='https://en.wikipedia.org'>en.wikipedia.org</a></html>"
htmlview! = window!.addHtmlView(101,25,25,550,350,html$)
htmlview!.setAutoNavigate(autoNavigate)
htmlview!.setCallback(htmlview!.ON_PAGE_LOADED,"event")
if hyperlinkEvents then
  htmlview!.setCallback(htmlview!.ON_HYPERLINK_ENTER,"event")
  htmlview!.setCallback(htmlview!.ON_HYPERLINK_EXIT,"event")
  htmlview!.setCallback(htmlview!.ON_HYPERLINK_ACTIVATE,"event")
endif
info$ = "getAutoNavigate: "+Boolean.toString(htmlview!.getAutoNavigate())
info$ = info$ + " " + htmlview!.getClientType()
info$ = info$ + " " + htmlview!.getClientVersion()
status! = window!.addStatusBar(99)
status!.setText(info$)

process_events

eoj:
  release

resize:
  event! = sysgui!.getLastEvent()
  htmlview!.setSize(event!.getWidth()-50,event!.getHeight()-50)
return

event:
  event! = sysgui!.getLastEvent()
  info$ = event!.getEventName()+" "+event!.getUrl()
  status!.setText(info$)
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

BBjHtmlView

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.