Skip navigation

Pop-up Windows

Although the use of pop-up windows is discouraged due to accessibility issues there are times when you may want to use one. You can add pop-up windows using the popup widget and load a custom template (handler) in the window.

Adding a Pop-Up Window

You add a pop-up window to a template or inside a page using the popup widget.

The widget supports setting of most common window attributes including width, height, scrollbars etc.

The popup widget requires either a title attribute or encolsed content between start and end popup tags. The title or enclosed content will be linked to launch the popup.

You can optionally specify a url and a template for the pop-up window. Typically you will specify a url if you wish to load a specific page or web site in the window. You specify a template to have the window load a custom template into the window.

This means you can create custom templates to display and process window content. For example a template can display a form and process the results.

Examples

  1. Pop-up window called with single tag using the title attribute. The popup loads a form and uses the qForms validation library. <widget:popup title="Example Form"/>: Example Form
  2. Pop-up window called with enclosing tags and loads the Google search homepage <widget:popup url="http://www.google.com" width="550" height="425">Google</widget:popup>:Google

Since no template was specified in the first example the pop-up window will load the default custom template. We have setup this template with the form, validation and to display the submitted results. Alternatively we could specify a handler using the template attribute: <widget:popup title="Example Form" template="form_template"/>.

Like all widgets you can add the popup widget to templates or directly in page content.

Location

http://www.assetnow.com/index.cfm/1,10,203,0,html