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'"
onLoad="roundedcorners();">
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 onLoad="roundedcorners();">
>
>
> 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 onLoad="roundedcorners();">
> <body
> py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'">
> <body
> py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
> onLoad="roundedcorners();">
> <body
> py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"
> py:attrs="onLoad='roundedcorners();'">
>
> No DIce(!)
>
> master.kid-> all of the above + <body onLoad="roundedcorners();"> 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"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:py="http://purl.org/kid/ns#"
> 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
> http://tg.scanmine.com:8080/tg_js/MochiKit.js line 3687
>
> 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...
>
>
>
>
> --
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
>
> Behind the firewall, nobody can hear you scream...
>
--
[EMAIL PROTECTED]