CapeSoft.Com
Clarion Accessories
NetTalk
Doc Index
WebServer Tasks
CapeSoft Logo

CapeSoft NetTalk
WebServer Common Tasks

Download Latest Version
Installed Version Latest Version

NetTalk WebServer - Tasks

Introduction

The goal of this document is to describe specific tasks that you may need to do, where those tasks don't fall easily into any of the other documents.

Convert a WebServer from Frames to Pages

As described in the other documentation, it is possible to build your web application based on a Frames approach, or a Page approach. The Frames approach has the advantage of being faster in some cases, because less html is required as you move around the application, however it also has the disadvantage of not being very suitable when browsing with a small screen (such as a phone). With the improvements in CSS support, and overall template support, it is desirable in some cases to change the application from using Frames, to one using pages. Fortunately this change is straight-forward, and doesn't not involve much work in the application.

This section will describe the process, by converting example Accounts (31) to example Books (71). Since your application may be slightly different to the example you may, or may not, need to perform all these steps in your own app.

Menu Procedure / Header

  1. Rename the menu page (MenuOnLeft) procedure to PageHeaderTag. Change the template type of this new PageHeaderTag procedure from NetWebPage to NetWebSource. Tick on the option This is a HEADER, and clear the CSS setting. Tick on the Declare Globally option.
  2. Remove the Target Frame setting from all the menu options. They are likely set to something like 'right_fram' - and this needs to be removed. (Targets set to '_blank' should be left alone.) Check any other procedures you may have that set the Target Frame as well, specifically check your Login procedure if you have one. In the Accounts example the IndexPage buttons all point to '_self_' which can also be removed. You may also find references to the target in the xHtml in the  FrameHeader and FrameFooter procedures.
  3. Copy and Paste the xHtml from the FrameHeader procedure into the PageHeaderTag procedure. In the Frame version of the application the header and menu procedures are separate, but in the page based application they are combined.

  4. Go to the Menu extension, CSS tab, TaskPanel tab, set Menu Div to 'nt-left'. This causes the TaskPanel menu to float to the left hand side of the window, and the browses and forms etc to appear to the right of it.

  5. On the menu extension, CSS tab, make sure the option to Wrap Menu in Table is off.

  6. Tip: If you have other xHTML embedded in the PageHeaderTag, make sure that each xHtml entry has a Location set.

Footer Procedure

  1. If your frame app has a footer, and the footer is in its own frame, then rename the FrameFooter procedure to PageFooterTag, and change it from a NetWebPage to a NetWebSource.
  2. Make sure your footer procedure has the option This is a FOOTER on, and clear the CSS class setting. Tick on the Declare Globally option.

IndexPage

The IndexPage is the first procedure the user will see when they go to your site. This is usually a NetWebSource procedure, but it could also be a NetWebForm, NetWebBrowse, or indeed even a static page on the disk. You can inspect your FrameSet procedure to see what is currently being used as the default in the "main" frame. This is usually the starting point for the Index page.

In the Accounts example the starting page is a NetWebForm, so there is nothing to do.

However if your starting page is a NetWebPage then you will need to add the tags;
<!-- Net:PageHeaderTag --> and <!-- Net:PageFooterTag --> to the xHtml.

If your starting page is a static html page in the web folder, then you will need to add <!-- Net:PageHeaderTag --> and <!-- Net:PageFooterTag -->  to the appropriate places in the page, and make sure the page has <!-- NetWebServer --> on the first line.

Whatever the name of this first procedure, that is the name you must set in the WebServer procedure, in the Default Page setting.

WebServer Procedure

  1. In the WebServer procedure, Set the Generic Page Header Tag and Generic Page Footer Tag to '<!-- Net:PageFooterTag -->' and '<!-- Net:PageFooterTag -->' respectively.
  2. Change the Default Page option to match the name of the site's IndexPage.
[End of this document]
Return to NetTalk Documentation Index