Skip to content
William Loosman edited this page Jan 13, 2014 · 12 revisions

!attention: webapp is under heavy construction. I work on this project alone and I hope to release version 1 in a few months from now.

To use webapp.js download webapp from github (you only need the webapp.js file!). And you need to include it inside your html page.

webapp uses:

  1. JQUERY
  2. JQUERY UI

so make sure you also include those:

<script type="text/javascript" src="http://url.com/js/jquery-2.0.3.min.js"></script> <script type="text/javascript" src="http://url.com/js/jquery-ui.js"></script> <script type="text/javascript" src="http://url.com/js/webapp.js"></script>

To enable the ajax you need to define a meta tag inside your html

tag:

<meta name="action-url" content="http://url.com/action.php">

action-url is the url where the ajax request will be sens to. You will have to create an ajax handler with whatever you use server side. When you download my full repository an example is included.

Now you can use all features of webapp.

Try this for example:

htmlpage

   <html>
      <head>
         <script type="text/javascript" src="http://url.com/js/jquery-2.0.3.min.js"></script>
         <script type="text/javascript" src="http://url.com/js/jquery-ui.js"></script>
         <script type="text/javascript" src="http://url.com/js/webapp.js"></script>
         <meta name="action-url" content="http://url.com/action.php">
      </head>
      <body>
          <load action="start" ></load>
      </body>
   </html>

PHP code

   <?
       if($_GET['action'] == 'start'){
           echo '<load query="body">Hello world I am loaded async</load>';
       }
   ?>

Clone this wiki locally