Are you runing into the cross-domain retriction with xmlhttp requests,
ie. xmlhttprequest responses must originate from the same server as
the request. your just doing a redirect, xmlhtpprequest seems like
overkill for that, is that the only way you can do it in IUI , its
been a long time since I've used that library.

It would be better to code something on the onclick of the button or
using an iframe with a callback link.

Firefox has a bit more flexible security than other browsers.

http://developer.yahoo.com/javascript/howto-proxy.html

On Jun 5, 4:48 am, mojo <[email protected]> wrote:
> Hi all
>
> I have a serious problem with a my site when it is showed in a Iphone
> and Safari.
> And I have come up to that the javascript (iui.js by Joe Hewitt) must
> be the problem.
> I'm not so good on JS so it would be good if anyone could explain what
> happens in the JS exactly. My brain is cooking here :P Now to a little
> description, from my point of view.
>
> When i press a link on the website, which should redirect me to a
> external site, a "click" event is trigged and later on a
> showPageByHref. The showpageByHref does something like this (JS could
> be found here ->http://code.google.com/p/iui/)
>
> var req = new XMLHttpRequest();
> req.onreadystatechange = function(){
>    //Some checking of the redyState}
>
> req.open("GET", href, true);
> req.send(null);
>
> Now to the weirdest thing: When this request is just a internal
> redirect everything works fine and I get redayState 1-4 and the page
> is showed in the browser. BUT when the request is a external redirect
> I just get readyState 1, and nothing else happens?! AND it doesn’t
> ends here, I can se in the apache logs that the Iphone connects to the
> external site and gets all content?!
> Did I mention that everything works fine in Firefox, IT DOES?!
> (Changed headers to emulate this from a PC, and tried it with safari
> on pc too but will not work there either)
>
> I have been thinking if the safari has some security checking that
> could be my problem, but when I can see that the connection is done to
> the external site and just only not displayed on the phone I have left
> this track.
>
> Someone who got any idea where the problem is?
>
> //Mojo
--~--~---------~--~----~------------~-------~--~----~
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