(1) When I link to another page (which iUI loads in via Ajax), none of
its JavaScripts seem to be executing. The Safari Web Inspector sees
the script tags, but nothing happens. Any idea what I'm doing wrong?
(2) Is there a way to add/subtract buttons from the toolbar as one
navigates from page to page? For instance, my master view might need a
"New" button, but the detail view shouldn't have it.
Thanks!
<code>
insertPages: function(nodes)
{
var targetPage;
for (var i = 0; i < nodes.length; ++i)
{
var child = nodes[i];
if(child.tagName && child.tagName.toLowerCase() ==
"script"){
eval(child.innerHTML);
}
else if (child.nodeType == 1)
{
if (!child.id)
child.id = "__" + (++newPageCount) + "__";
var clone = $(child.id);
if (clone)
clone.parentNode.replaceChild(child, clone);
else
document.body.appendChild(child);
if (child.getAttribute("selected") == "true" || !
targetPage)
targetPage = child;
--i;
}
}
if (targetPage)
tmm.showPage(targetPage);
},
</code>
At least this works when the script-tag is at the same level of the
lists used for the other pages. Haven't tried it yet with javascript
attached to DOM-elements as I add listeners on the fly.
Hope this helps ^^
--
http://www.snyke.net/blog
On Aug 27, 6:25 pm, Snyke <Decker.Christ...@gmail.com> wrote:
window.myFunction = function() {}
...but no big deal. Any idea if there's a performance hit involved in
calling scripts this way?
Excellent, thanks.
On a related note, what's the best method for re-compressing iUI after
one makes changes to it?
(And, while I'm at it, can someone point me toward a primer on how to
use gzip for further compression? I've heard of it but am not familiar
with what it entails.)
--Dave