Well I educated myself using your directions and solve the problem and
got  a bit smarter in the process :)
I just added this function at the top of my JS

function loaded(i,f) {
if (document.getElementById(i) != null) f();
else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);
}

loaded('question_button',play);

The 'question_button' is an id at the bottom of the play page and so
runs play() once it exists.

Thanks

Jeff

On Dec 1, 7:22 am, Maximilian Melcher
<[email protected]> wrote:
> You could use the event "afterinsert" or "aftertransition" (verify the
> names, cant do it right now). Just add an eventlistener for example
> like the click listener and call your function.
>
> Cheers
> Max
>
> Am 01.12.2009 um 12:58 schrieb Remi Grumeau <[email protected]>:
>
>
>
> > Well first, you should definitely put a welcome message on your
> > index page
> > "Cross your fingers and hold your lips while you navigate"
> > :-)
>
> > Then, put us a URL where we can see and test that
>
> > Remi
>
> > Le 1 déc. 2009 à 00:29, Jeff H a écrit :
>
> >> Hi,
> >> I am fairly new to iui and I hope this question is simple.
> >> When I load a page from my menu
>
> >> <li id="play_menu"><a onclick="play()" href="play.html">Play</a></li>
>
> >> I have to put a time delay on the play() function in my js. Then it
> >> works.
> >> If I do it without a time delay - the play() function does not always
> >> run.
>
> >> I have tried using onload in the line above - but it does not work.
> >> The onclick only works if my fingers are crossed and I hold my lips
> >> correctly.
> >> Plus - it is less likely to work on my iphone than in chrome.
>
> >> How am I best to get around this.
>
> >> (Fantastic work on iUi! )
>
> >> --
>
> >> 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 
> >> athttp://groups.google.com/group/iphonewebdev?hl=en
> >> .
>
> > Remi Grumeau
> > (+33) 663 687 206
> >http://www.remi-grumeau.com

--

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