Here's how I implemented this for now...

I modified iui.js to look for an onload attribute after sliding:

<code>
            percent = 0;
            if (!hasClass(toPage, "dialog"))
                fromPage.removeAttribute("selected");
            clearInterval(timer);
            checkTimer = setInterval(checkOrientAndLocation, 300);
            setTimeout(updatePage, 0, toPage, fromPage);
            if ( toPage.getAttribute("onload") ) {
                eval(toPage.getAttribute("onload"));
            }
</code>

Now I can simply put an onload attribute in my page tag per the
previous example. Haven't tested this thoroughly, but it got me past
my current hurdle.

David

On Dec 6, 4:44 pm, David  Ethell <[EMAIL PROTECTED]> wrote:
> I've searched past discussions and can't find it. Is there a way to
> specify some javascript to run on the loading of a new page?
>
> I used on persons suggestion of searching for child nodes of type
> script and doing eval on them, but I'd also like to have a simple
> onload in the top element of the new page loaded by AJAX. Something
> like:
>
> <code>
> <ul id="newpage" class="panel" onload="someFunction();">
> <li>content</li>
> </ul>
> </code>
>
> Any thoughts?
>
> David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" 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/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to