Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Opening the HTML editor and setting options – PB Docs 90 – PowerBuilder Library

Opening the HTML editor and setting options – PB Docs 90

Opening the HTML editor and setting options

The following procedures detail using the HTML editor to prepare
HTML files. HTML tags and their attributes can be dragged and dropped
from the Language tab of the System Tree onto a page in the HTML
editor. The tags are organized alphabetically or by category.

Opening the HTML editor

You can open the HTML editor with a new file that you create
with a Web page wizard, or you can open the editor with an existing
file, regardless of whether it is in your current Web target.

Creating a new document

PowerBuilder has several wizards that
help you create new Web pages. The main Web page wizards are listed
below. Each of the wizards can create an HTM file or a JSP file,
depending on the type of target to which you are adding the page.

Table 3-2: Web page
wizards
Web page wizard Use this to
Quick Web/JSP Page Create an HTML page without any content
(HEAD and BODY elements are visible in Source view as soon as you
begin to add content to the page).
Web/JSP Page Create an HTML page with a filename and
optional content, such as a title, an associated style sheet, a background
image or color selection, a header based on the title, and a footer
with the page creation date.
4GL Web/JSP Page Create a 4GL Web page with error and
trace options, parameter definitions, and EAServer component selections
in addition to the standard content options of the Web Page wizard.
Web/JSP DataWindow Page Creates an HTML page with a Web DataWindow.
You define the DataWindow source and connection information in wizard
screens.

proc.gif To start the editor with a new document:

  1. Select File>New.
    Click
    the Web tab in the New dialog box.

  2. Double-click a Web page wizard icon.

  3. Follow the instructions in the wizard.

  4. When the HTML editor opens, begin editing in Page
    view.

    or

    Click the Source tab to edit in Source view.

Starting the editor with an existing document

PowerBuilder can automatically open text, style sheets, and
scripts. The file’s treatment is based on its extension:

  • Text files with TXT extensions are opened for editing
    in the PowerBuilder File editor.
  • Text files with ASP, HTM, HTML, JSP, STM, or SSC
    extensions are opened for editing in the HTML editor.
  • Style sheet files are opened in the standalone Style
    Sheet editor.
  • Script files are opened in the standalone Script
    editor.
  • Image files are opened in a browsing window for
    viewing only.

note.gif Dragging files onto an open page in the HTML editor Text files, style sheets, or script files can also be referenced
as hyperlinked documents. If you drag and drop a file from the System
Tree (or from an external file management system) onto an open page
in the HTML editor, the dragged file is treated as a hyperlink reference,
and the Hyperlink Properties dialog box displays.

proc.gif To open an existing Web target file:

  1. Double-click the file in the Workspace
    tab of the System Tree.

proc.gif To open a file that is not part of a target:

  1. Select File>Open from the menu
    bar, select a file type in the Files Of Type text box, and browse
    to find the file in the Open dialog box.

Saving your work and closing the editor

proc.gif To save changes to a file:

  1. Select File>Save.

    For a new file, File>Save displays the Save As dialog
    box so you can name the file.

proc.gif To create another copy of the file:

  1. Select File>Save As.

If you try to close the editor without saving, the editor
asks if you want to save your changes.

Giving your page a title

Use the Page Properties dialog box to add a title and to set
inline styles and parameters for your HTML or JSP page.

note.gif 4GL page properties If you select the Enable 4GL Web Server Side Event Model check
box on the Page tab of the Page Properties dialog box, you enable
additional dialog box tabs. These tabs allow you to define server-scriptable
properties for your page. For information on 4GL Web pages, see Chapter 9, “Developing 4GL Web Pages”.

proc.gif To give your page a title:

  1. Right-click anywhere in a document in Page
    view and choose Page Properties from the pop-up menu.

  2. Type a title for your page in the Title text box
    on the Page tab of the Page Properties dialog box.

    pgprop1.gif

Formatting HTML source display

Source view allows you to format your HTML source code for
readability. This feature enables you to specify your own HTML source
formatting rules. It overrides the default formatting that the editor
applies when you edit a file in Page view or use a tool or menu
item to generate code in Source view.

Why use HTML source formatting

This feature is important if you use Page view to develop
or modify your HTML files. Page view edits your HTML source code
behind the scenes, then formats that code according to its own rules
for indenting, new lines, and so on. Although this default formatting
is generally adequate, it might differ from the coding style you
want.

Source formatting options enable you to override the default
formatting generated from Page view with your own code formatting
rules.

Invoking HTML source formatting

If you select the Format Source option (on the Editors tab
of the Options Properties dialog box), PowerBuilder automatically
performs HTML source formatting in these cases:

  • When
    you switch to Source view from other HTML editor views after making
    changes
  • When you perform operations in Source view that
    generate code

Whether or not you check the Format Source option, you can
invoke HTML source formatting manually, at any time, by selecting
the Format Source command on the Source view pop-up menu.

Preserving your own source formatting

If you prefer to
format your HTML source code manually and keep it in that format,
use Source view instead of Page view for all your editing, and do
not select the Format Source command from the Source view pop-up
menu.

proc.gif To change the Source view display formatting:

  1. Select Design>Options.

    The Options Properties dialog box opens to the Editors page.

  2. In the Windows list, highlight Source View.

    Select the Format Source check box.

    Type or select other options in the Editors panel.

  3. Select an HTML tag or Script tag from the Tags
    list.

    Select a radio button for the type of formatting you
    want for that tag.

    edopts.gif

  4. Repeat the previous step for as many types of
    tags as you want to format and click Apply.

  5. Select the Colors/Fonts tab.

    In the Window list, highlight Source View.

  6. Select a display element in the Types list.

    Modify the display element colors and fonts as desired.

  7. Repeat the previous step for as many display element
    types as you want to format and click OK.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x