On Apr 2, 1:18 pm, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> apm schrieb:
>
> > i could not figure out how to solve this when looking at your widget,
> > either, because the template folder is empty. what am i missing?
>
> Code, please.
sure, but there is not much code here, actually
the thing is just that dojo works (with a genshi template served by a
TG controller mehtod) when the script tag
<script type="text/javascript" src="${tg.url('/static/javascript/dojo/
dojo.js')}" djConfig="parseOnLoad: true">
is in the head of my hello.html, but as soon as i include the
master.html
<xi:include href="master.html" />
there is no more dojo, independent of whether dojo.js is included in
hello.html or master.html or both. mochikit has been disabled, too.
there seems to be a conflict between the two, somehow.
all of this is without Michele's widget. one thing at a time...
thanks
andré
master.html
=========
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<head py:match="head" py:attrs="select('@*')">
<meta content="text/html; charset=UTF-8" http-equiv="content-type"
py:replace="''"/>
<title py:replace="''">Your title goes here</title>
<link py:for="css in tg_css" py:replace="ET(css.display())" />
<link py:for="js in tg_js_head" py:replace="ET(js.display())" />
<meta py:replace="select('*')" />
<link rel="stylesheet" type="text/css" media="screen" href="$
{tg.url('/static/css/style.css')}" />
<script type="text/javascript"
src="${tg.url('/static/javascript/dojo/dojo.js')}"
djConfig="isDebug: false, parseOnLoad: true">
</script>
</head>
...
hello.html
=======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" /> <!-- REMOVING THIS TAG MAKES DOJO
WORK -->
<head>
<title>Dojo: Hello World!</title>
<!-- SECTION 1 -->
<style type="text/css">
@import
"static/javascript/dijit/themes/tundra/tundra.css";
@import "static/javascript/dojo/resources/dojo.css"
</style>
<script type="text/javascript"
src="${tg.url('/static/javascript/
dojo/dojo.js')}" djConfig="parseOnLoad: true">
</script>
<!-- SECTION 2 -->
<script type="text/javascript">
// Load Dojo's code relating to the Button widget
dojo.require("dijit.form.Button");
</script>
<script>
function helloCallback(data, ioArgs)
{
alert(data);
}
function helloError(data, ioArgs)
{
alert('Error when retrieving data from
the server!');
}
</script>
</head>
<body class="tundra">
<button dojoType="dijit.form.Button" id="helloButton">Hello
World!
<script type="dojo/method" event="onClick">
alert('You pressed the dojo button');
</script>
</button>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---