option to change the directory that amber js files are located

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

option to change the directory that amber js files are located

Chris Zheng
currently, all the files are in 'js' directory. If I change the 'js' directory to 'javascript' none of the files work anymore. is there an option in amber.js to load files from the same directory?
Reply | Threaded
Open this post in threaded view
|

Re: option to change the directory that amber js files are located

Nicolas Petton

Yes, you can specify the 'prefix' string.

Nico

Chris Zheng <[hidden email]> writes:

> currently, all the files are in 'js' directory. If I change the 'js'
> directory to 'javascript' none of the files work anymore. is there an
> option in amber.js to load files from the same directory?
--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: option to change the directory that amber js files are located

Chris Zheng
This is my entire file for the hello example.

<!DOCTYPE html>
<html>
  <head>
    <title>My First Amber Project</title>
    <script src="/javascript/amber.js" type="text/javascript"></script>
    <script type="text/javascript">
      loadAmber({
        files: [],
        prefix: '/javascript',
        ready: function() {
          smalltalk.Browser._open();
        }});
    </script>
  </head>
  <body onload=''>
    <article>
      <h1>My First Amber Project</h1>
      <button onclick="smalltalk.Browser._open()">class browser</button>
      <button id="sayHello">say hello</button>
    </article>
  </body>
</html>

it seems to still try to load from the js directory.