Scott Finkelstein wrote: > I was actually intrigued by the second example on this page (Ajax > Link). I see that you are storing that ajax panel (minus the toolbar) > in a file called "fragPanel.frag" thus bringing that separate section > into the framework. >
.frag is just a convention that I use for serving incomplete HTML from static files. They could be dynamically generated by PHP or any server-side technology and can have any extension. > So assuming I need to run a javascript from within one of these .frag > files, > is there an event > listener I can call when the .frag file is brought in to the main > view? Yes. There are beforeInsert and afterInsert events that you can use. There is an event logger sample that demonstrates how to use them: http://code.google.com/p/iui/source/browse/web-app/iui/js/iui-event-log.js There also have been several patches submitted for earlier versions of iUI that have various mechanisms to run JavaScript that is loaded in a fragment. I added the events to iui.js so that any of these mechanisms could be used without the need to modify iui.js itself. See: http://code.google.com/p/iui/issues/detail?id=102 http://code.google.com/p/iui/issues/detail?id=128 > I tried both 'aftertransition' and 'load' with no success. > Hmm. You probably should have been able to get it work using "load" as well (with the only issue being that your code might be called more than once) What was the problem? -- Sean -- 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.
