Linking to a Module From a Website
See also

Description
To make good use of a QuickModules.com application, you need to be able to run it from within your website, not simply run it from within your account. Running an application remotely is more useful since any user of the website will be able to access it; also, it will add more power to your website. QuickModules.com makes it easy to run applications remotely. This is done by allowing direct linking to modules using regular HTML links (URLs). By default, linking to a module is disabled for security reasons. You can enable access by editing the module and checking the option titled 'Allow access to this module through a URL link'. The 'Edit Module' screen will also show you the URL link which you may include in your web page for direct access. If access is allowed to the module and you copy and paste the link in your browser, you will be able to see your application run in that browser.

Adding a link to a Module From a Web Page
In order to integrate an application into your web site, you have to link to it from one or more of your web pages using a regular URL link. Each module is assigned a reference link by QuickModules that is unique to it. This link is visible on the 'Edit Module' screen. You can go to this screen by clicking on the 'Modules' link in the toolbar on the left to obtain the list of all modules in your account, then clicking on the 'Edit' bullet (Edit symbol) to the left of the module name in the list. The link is visible clearly and is displayed in a dark shade of blue. An example is:

http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG

To create a simple link to your module from a web page, you can create a text or image link to it. For example:

<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG">Run the module</a>

The above HTML code will create a link for the text 'Run a module'. If someone clicks on that link, the module will be displayed in the browser. Of course, you will have to substitute the link to your own module instead of the link to the example module displayed above.

Similarly, you can having a link from an image instead of a text:

<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG"><img src="/images/btn_run.gif"></a>
You can have the application popup in a new window by specifying a destination target:
<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG" target="_blank"><img src="/images/btn_run.gif"></a>

Using simple links has a disadvantage: it completely replaces the current web page with a new one. For instance, when someone clicks on the link to your module from your web page, the browser will switch completely to the module display and all trace of your web page will be lost. This may be inconvenient if you want to keep parts of your web page visible, such as your logo, a main menus, and copyright information. The way around this is to display the module as part of a frame in your web page. If you are exclusively using Internet Explorer 4 or above, then the easiest way is to use the IFRAME HTML tag to display the module in a section of your web page. This has the smoothest integration effect. An example is:

<IFRAME src="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" width="350" height="300"></IFRAME>

The above code will display the module within your page in a rectangle that is 350 pixels wide and 300 pixels high.

By default, the modules will be displayed with a white background. You can modify the colors easily by placing the proper HTML tags in the header and footer of the displayed procedurs. For instance, if you want your entry screen to appear with a yellow background, you can go the the 'Edit Procedure' screen for the proper procedure and add the following tags to the header:

<table border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#FFFF00">

You also need to add the following to the footer in order to close the tags opened in the header:

</td></tr></table>

The above header and footer HTML will cause the whole data entry screen to appear in a table cell whose background color is yellow. Concequently, when included in your web page, it will have a yellow background. This way, you can change the colors to conform to the standards used in your website.

Passing Variables to a Module
Sometimes it is necessary to pass a variable to a module so it can run properly. For instance, suppose you want to return the result of a search by City, and you want to put in your web page a separate link for immediate search on that city. So if a user clicks on 'New York City', a report with all records related to 'New York City' are generated. One way to do it is to have a separate module for each city. The name of the city will be hard coded into that module so it always search for that particular city. This is inconvenient though if you have a large number of cities because it means you have to create a large number of modules. An easier way to do it is to create one module which can search based on a variable value for the city which is passed to it as a form variable in the URL reference. For example:

<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG&City=New+York+City"><img src="/images/btn_run.gif"></a>

The above reference will create a variable called 'City' whose value can be accessed by your module using the variable reference [VAR.CITY]. Please refer variables for more information about this subject.

See Also
Communication Between Modules
Variables

 

Copyright © 2001 RIQ Technologies Inc. All rights reserved.
Copyright Policy, Privacy Policy, License & Terms of Use