Skip to content
wvanbergen edited this page Sep 13, 2010 · 14 revisions

First, you have to include the Floorplanner Javascript class into your page. Floorplanner uses the swfobject library, which must be included as well in the header of your page.

<script type="text/javascript" 
    src="http://beta.floorplanner.com/javascripts/floorplanner/swfobject_20.js"></script>
<script type="text/javascript" 
    src="http://beta.floorplanner.com/javascripts/floorplanner/floorplanner.js"></script>

Now make, sure to add an element to your page in which the Floorplanner application should be loaded. To load Floorplanner, you will have to create a Floorplanner-object, make it point to your project and embed in into the HTML element. This can be done with the following code.

First, you have to include the Floorplanner Javascript class into your page. Floorplanner uses the swfobject library, which must be included as well.

<script type="text/javascript">
<!--
window.onload = function() {
  var fp = new Floorplanner({project_id: your_project_id }); // Create the Floorplanner object
  fp.embed('div_name'); // Load floorplanner in the element with ID "div_name"
}
-->
</script>

That should be all!

Additional resources

  • The Floorplanner application supports several options to change its looks and behaviour. These options can be passed to the Floorplanner constructor, just like the project_id options was passed. See JavascriptOptions for the available options.
  • The application yields several events. You can add event handlers to these events to customize the behaviour. See JavascriptEvents for more information on this topic.
  • The application exports several functions that can be called by Javascript. These functions can be used to inspect the current state of the application, or to perform actions on it. See JavascriptFunctions for a reference.

Clone this wiki locally