There might be an easier way, but rather than return HTML-with-
embedded-javascript in your response, you could serve an XML file that
contained something like

< html > ....the html response.... < /html >
< js > ...your javascript code....< /js >

Then parse the response from XMLHTTPRequest.responseXML (see example:
http://www.webpasties.com/xmlHttpRequest/xmlHttpRequest_tutorial_5.html)
and 'eval' the js that is returned, and use the html for setting
innerHTML or whatever you were going to do with it.

Kind of hackish, but it will work.

Pez



On Aug 21, 12:23 am, BikePilgrim <[EMAIL PROTECTED]> wrote:
> Has anyone using the iUI toolkit tried to run javascript from the ajax
> pages they load? I've tried putting <script> tags in the ajax
> responses. They run in firefox, but not on the iPhone or Safari. I'm
> trying to think of some way to trigger some code after the ajax calls.
> Does iUI provide some way to do this?
>
> Pilgrim


--~--~---------~--~----~------------~-------~--~----~
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