Well, there seems to be a bit of a problem with Mochikit and
Scriptaculous, but I can't definitively say what is is, all I can say
is the noted problem and solution.

Noted problem: scriptaculous library would work fine in IE7 but not
Firefox2.0 when loading as such:

<script type="text/javascript"
src="app/javascript/mochikit/MochiKit.js"></script>
<script type="text/javascript"
src="app/javascript/prototype.js"></script>
<script type="text/javascript"
src="app/javascript/scriptaculous/scriptaculous.js"></script>

However, loading the mochikit library last worked fine in Firefox, but
not IE:
<script type="text/javascript"
src="app/javascript/prototype.js"></script>
<script type="text/javascript"
src="app/javascript/scriptaculous/scriptaculous.js"></script>
<script type="text/javascript"
src="app/javascript/mochikit/MochiKit.js"></script>

IE7 needs the first configuration to run properly and Firefox2.0 the
second config. Ugh.

The reason appears to me to be because of scriptaculous also trying to
write out to the document to make references to its own libraries.

The solution I found, and I'm not sure why it works! is this load the
mochikit.js and prototype libs in the head, and then scriptaculous in
the body, as such:

<head>
        <script type="text/javascript"
src="app/javascript/mochikit/MochiKit.js"></script>
        <script type="text/javascript"
src="app/javascript/prototype.js"></script>
</head>

<body onload="init();">
        <script type="text/javascript"
src="app/javascript/scriptaculous/scriptaculous.js"></script>

...
</body>


If anyone could shine some more light on why this issues occurs, I
would appreciate it. It took me a couple of hours to track this down,
so I would like to understand exactly whats going on here...

Cheers,

Mark


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to