w2layout.load

Loads content and renders it inside the panel.
load(type, url, [transition], [onLoad])
type string, name of the panel
url string, server url to load content from
transition string, name of the transition (optional)
onLoad function, JavaScript call back function (optional)

Description

This method loads content for the panel from the url. The content should be Text or HTML and should not include JavaScript. The first argument type is the name of the panel. It can be one of the following:
  • top
  • left
  • main
  • right
  • preview
  • bottom
The second argument url is the location to load content from. You can optionally provide transition that defines visual transition to the new content. The transition is done using w2utils.transition() method and it can be one of the following:
  • slide-left
  • slide-right
  • slide-up
  • slide-down
  • flip-left
  • flip-right
  • flip-up
  • flip-down
  • pop-in
  • pop-out
Below is an example how to set content to the layout panel: If you want to execute some JavaScript code after content was loaded and displayed, you can provide onLoad argument which is a JavaScript function.

User Comments

comments powered by Disqus