Ian Wilson wrote:
> What do you mean by doesn't work? The file isn't being included or
> the function has errors?
>
> I"ll just guess the file isn't being included. What happens when you
> go directly to the file in the browser?
>
> For example if you are running your server at localhost:8080 then try going to
> http://localhost:8080/static/javascript/help.js
>
Here the output....
500 Internal error
The server encountered an unexpected condition which prevented it from
fulfilling the request.
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py",
line 103, in _run
applyFilters('before_main')
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/filters/__init__.py",
line 151, in applyFilters
method()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/filters/staticfilter.py",
line 53, in before_main
raise cherrypy.WrongConfigValue(msg)
WrongConfigValue: StaticFilter requires an absolute final path. Make
static_filter.dir, .file, or .root absolute.
> The file should show up. If it does not then the file isn't being
> found and maybe you should check that the name and permissions of the
> file are correct.
>
> Also I think you should have this in either your app.cfg(mine is
> located in /project/config/app.cfg or your dev.cfg/prod.cfg located in
> your project's root directory.
>
> [/static]
> static_filter.on = True
> static_filter.dir = "%(top_level_dir)s/static"
In my dev.cfg I have:
[/static]
static_filter.on = True
static_filter.dir = "sicer"
where "sicer" is my project name.
>
> Good luck.
>
> -Ian
>
> On 10/30/06, Jose Soares <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > May someone help me calling javascript functions?
> >
> > In my edit.kid I would like to insert a javascript function like this:
> > <script>
> > function help(){
> > alert ('Ciao')
> > }
> > </script>
> >
> > This one works, but if I move the function to a file into
> > myproject/static/javascript/help.js
> > it doesn't work anymore.
> >
> > This is my definition in my edit.kid:
> > <head>
> > <script type="text/javascript" src="/static/javascript/help.js"></script>
> > </head>
> >
> > What's wrong with it?
> >
> > jo
> >
> >
> >
> >
> >
> > >
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---