Im trying to make an iphone app that has slideing windows. If I had static content I could use this guys procedure as this perfect for the framework I am using. However each page I have has different javascript in the head of the document so I need to find a method that will do the same sort of thing for the javascript. Like load specific javascript depending on the page.

So I found this which works perectly if i don't need to use functions within the inserted javascript.

Does anyone know how I could load javascript depending on what page is loaded (all without refresh) or uses pauls example and get functions to work.