Thank you! Now it works. And that's good enough for me until 1.0 :)

regards
/rune

On 20. des. 2005, at 10.44, Lee McFadden wrote:


Would it be easier to get around Kid with Mochikit's addLoadEvent()? 
So in your master.kid you'd have the following section:

<script type="text/_javascript_">
    addLoadEvent(roundedcorners);
</script>

I know this doesn't solve the actual problem, but it does work around
it and should make things work. :)

Lee

On 12/19/05, Jared Kuolt <[EMAIL PROTECTED]> wrote:

What version are you running, btw?

I'm running latest svn, which has kid 0.8 as far as I can recall. If
you're running TG 0.8a4 (0.8a5 is latest) or older you have Kid 0.7. I
don't know if that's the problem or not, but I'll keep looking into
this.

On 12/19/05, Rune Hansen <[EMAIL PROTECTED]> wrote:
Hi Jared,
I do appreciate that you are spending time to investigate this.
master.kid
<body
py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
>

Server is restarted.

View source of welcome.kid:
<BODY>
    <DIV
STYLE="width:300px;margin:1em;background-color:#CCC"
ID="rounded">

No sign of the onLoad statement.

This is of course no big deal, I can live without the rounded corners but
it's irritating nevertheless.

regards
/rune




On 19. des. 2005, at 21.58, Jared Kuolt wrote:


Try this one again, just remember to restart your application. Kid
doesn't recompile the templates when the master.kid (or any extended
template) is changed.

<body
py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
>

On 12/19/05, Rune Hansen <[EMAIL PROTECTED]> wrote:


On 19. des. 2005, at 18.07, Jared Kuolt wrote:


I haven't worked much with mochikit, but at first glance, you're
calling roundedcorners() before the element appears. Try putting that
method in the onLoad of the body.

<body >


Hi Jared, that was supposed to be my next question.
It does absolutely not matter how I set up master.kid/welcome.kid - onLoad
never shows in the <body when viewing source

master.kid:
<body >
<body
py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'">
<body
py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
>
<body
py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
py:attrs="">

 No DIce(!)

master.kid-> all of the above + <body > in
welcome.kid

Still No Dice(!) (sorry 'bout the Charles Bronsonisms...I've just watched a
Simpson episode).

Now, serving the file static with cherrypy works(not surprisingly).
So, removing KID from the equation solves the problem. This seems to be a
trend for me, removing KID I mean.

I hope some KID experts out there can tell me what to do to make this work.

regards
/rune





On 12/19/05, Rune Hansen <[EMAIL PROTECTED]> wrote:
This might belong on the Mochikit mailinglist, but I thought I'd better ask
here first.
The simplest of KID templates and mochikit:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    py:extends="'master.kid'">

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type"
py:replace="''"/>
    <title>Welcome to TurboGears</title>

    <script language="_javascript_">
        var roundedcorners = function() {
            roundElement("rounded",{corners:"all"});
    }
    roundedcorners();
    </script>
</head>

<body>
    <div id="rounded"
style="width:300px;margin:1em;border:1px solid black;">
        Hello
    </div>
</body>
</html>

This is a stripped down welcome.kid(The master.kid includes MochiKit.js)

I get:
TypeError - Null value

Is this KID playing havoc or is it MochiKit? Or, more likely, is it me?

regards
/rune


---------------------------------------------------------------------

Behind the firewall, nobody can hear you scream...




--


---------------------------------------------------------------------

Behind the firewall, nobody can hear you scream...




--


---------------------------------------------------------------------

Behind the firewall, nobody can hear you scream...



--


---------------------------------------------------------------------

Behind the firewall, nobody can hear you scream...


Reply via email to