I am porting a mobile search application to the iPhone. Generally I
have really good success in using the iUI. I started by just copying
the 'Music' example and changing it from there. I first wrote the app
to run on Safari(PC, I do not have a Mac), and all worked really well.
I got to a checkpoint and tried to run on the iPhone. I found two
significant errors.
1) The calls to document.body failed, it seems that the document.body
is undefined. This is not a big surprise as the tag is really
depricated in the normal PC browsers, however it works without changes
on the Music sample. That threw me for a loop, but it was an easy fix.
if ( !document.body ) document.body =
document.getElementsByTagName("body").item(0);
There may be other ways, but to me this was simple.
OK, now my forms show. Yippee!
However when I press the search button, nothing 'appears' to happen.
It is supposed to run an Ajax request and receive an HTML snippet,
then insert it using the innerHTML property on the frag div. Through
some 'alert' testing ( firewall restrictions prevent me from using the
firebug proxy) I found out that the the responseText was coming back
and being stored in the innerHTML property, however it was not
becoming a child node under the frag div, therefore no childNodes were
passed into the insertPages method. I did not have this problem in
Safari or Firefox.
Has anyone encountered this error before? I am at a standstill trying
to debug this.
Any help or direction is much appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---