Register

How to create a full screen popup launcher for you Viewlet

General Tips & Tricks
Site Admin
User avatar
Posts: 223
Joined: Fri May 26, 2006 1:51 pm
Location: Rochester, NY

How to create a full screen popup launcher for you Viewlet

Postby Andrew » Wed Apr 25, 2007 11:03 am

This post will describe how to create a popup launcher for your Viewlet that will display the viewlet in a browser window sized to fill the screen in ViewletBuilder4.

In "Compile Properties" select "Advanced" tab and select the "Create an HTML popup launcher" checkbox.

Publish your Viewlet to a local folder, such as "My Viewlets" Lets assume you save your viewlet under the name "demo.qvp" Please replace the word "demo" with the name of your viewlet.

After publishing, click on the Browse button.

The file named "demo_launcher.html" displays the link used to launch the popup. It has javascript code to open the new window and load the Viewelt. Open this file in your favorite text editor.

You will see a line like this:
<a href="javascript:popup_window('demo_viewlet_swf.html', 'demo', 664, 528);">Viewlet From Qarbon</a>

Replace it with this line
<a href="javascript:popup_window('demo_viewlet_swf.html', 'demo', screen.width, screen.height);">Viewlet From Qarbon</a>

Then open the file demo_viewlet_swf.html. This is the file that contains the Viewlet. We want to make sure the Viewlet is scaled to fill 100% of the browser window. If you search through it you will see 2 places the where the width and height are specified within the <object> tag. Replace both with 100%.

For example: width="640" height="496" would get changed to width="100%" height="100%"

Save both the files and you're done.
Andrew Branch

Return to FAQs - ViewletBuilder 4.x

Who is online

Users browsing this forum: No registered users and 1 guest