Skip to main content

Hyperevents

Hyperevents is a CSP feature that allows JavaScript event-handling code on a CSP page to execute Caché methods on the Caché server. With hyperevents, methods on the Caché server can update the information displayed on a page without reloading the page. In addition, the Caché server method can itself return JavaScript code that immediately executes when it is returned to the client browser.

Here are the syntax options for using hyperevents:

Hyperevent Syntax
Syntax Description
#server(package.class.method(JS args))#
#server(..method(JS args))#
#vbserver(package.class.method(JS args))#
#vbserver(..method(JS args))#
  • Use #server()# to execute ObjectScript methods.
  • Use #vbserver()# to execute Caché Basic methods.
  • method is any class method.
  • JS args are JavaScript variables or DOM references or CSP expressions that returns JavaScript variables or DOM references.
#call(package.class.method(JS args))#
#call(..method(JS args))#
This mechanism differs significantly from the above mechanism:
  • Method calls are asynchronous.
  • Method calls cannot return values to the client.
FeedbackOpens in a new tab