Table Of Contents

Previous topic

Javascript Utilities

Next topic

5. Generating Sitemaps

This Page

Page Structure and Navigation

Page Structure

page_body
global reference to the Body
class Body

Created by app.js

header
Head element
footer
Footer element
left_side_bar
Left Sidebar Element
right_side_bar
Right Sidebar Element
center
Center content Element
pages
Dictionary of pages by label
cur_page
Current page
add_page(label, onshow)
Returns a new page (DIV) with label. Optionally onshow function will be called when the page is shown
change_to(page_name)
Switch to the given page

Opening existing resources (Pages, Forms etc)

loaddoc(doctype, name, onload, menuitem)

Open an exiting record (doctype, name) from the server or Locals

Optionally you can specify onload method and menuitem. If menuitem is specified, it will show the menuitem as selected whenever the record is reloaded.

new_doc(doctype, onload)
Open a new record of type doctype
loadpage(page_name, call_back, menuitem)
Open the page specified by page_name. If menuitem is specified, it will show the menuitem as selected whenever the page is reloaded.
loadreport(doctype, rep_name, onload, menuitem, reset_report)
Open the report builder of the given doctype. Optionally if rep_name is specified, it will open the corresponding Search Criteria identified by criteria_name

History

History is maintained by framgments using the Really Simple History (rsh) library

global reference to the history object
Notify of a new page opening. Add to history * type is either - Form, Report or Page * p1 is DocType in case of Form or Report and page name in case of Page * p2 is record name in case of DocType, criteria_name in case of Report
Execute Back button