Can't POST FormData from iBooks widget on iPad

I have a Dashcode widget that simply submits contact information from a three-field form to a PHP script on our server. It works properly when run/debugged from Dashcode. But when I drop it into iBooks Author and preview it on an iPad (either v2 or v3), the XMLHttpRequest POST no longer works properly. On the server, the form is ocassionally received with a request type of "OPTIONS" instead of "POST" so none of the form data is available to the server-side script. The content length is also reported as 0 (zero) on the server. Other times, the data is received correctly, but the widget's onerror function fires instead of onload, even when a 200 status is returned from the server.
The code worked fine in both Dashcode and on the iPad in a test iBook. Then I tested it after disabling wifi to ensure that errors would be handled properly. It hasn't worked again since enabling wifi. It could be a coincidence. I've relaunched iBooks, deleted and reinstalled the book, restarted the iPad, restarted Dashcode and iBooks Author. I've even created a new widget with nothing but a Submit button and hard-coded form values:
function submit(event)
    var formData = new FormData();
    formData.append("name", 'Name');
    formData.append("email", 'Email');
    formData.append("question", 'Question');
    var xhr = new XMLHttpRequest();
    xhr.open("POST", "http://www.example.com/example.php");
    xhr.onload = function(e) {
        if (this.readyState == 4) {
            if (this.status == 200) {
                helloText.innerText = 'Success';
    xhr.onerror = function(e) {
        helloText.innerText = 'Error: ' + this.status + ': ' + this.responseText;
    xhr.send(formData);
The widget is set to Allow Network Access and "10.4.0 (backward-compatible)". Any tips will be greatly appreciated.

I tried saving the .ibooks file and sync'ing it through iTunes instead of using Preview, but see the same result. The post data was received successfully on the server. Although the server sends a 200 status code, the widget's onerror function fires and reports a status of "0" and empty responseText.
This is a step in the right direction. But we can't use it if we can't properly provide success/failure feedback to the user.

Similar Messages

  • How can we post data from CRM to SAP using ABAP proxies???

    Hi ,
      Can anyone hep me to create interface for the following scenario How can we post data from CRM to SAP using ABAP proxies???, can I find any document ???????
    Thanks in advance
    Andy

    Andy,
    Please look at these weblogs.
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    /people/ravikumar.allampallam/blog/2005/03/03/creating-purchase-order-idoc-through-xi
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    These should give a good idea about implementing Proxies.
    Regards,
    Ravi

  • I PURCHASED A BOOK FROM IBOOKS ON MY IPAD, CAN I READ THAT BOOK FROM MY MAC COMPUTER ALSO

    I PURCHASED A BOOK FROM IBOOKS ON MY IPAD, CAN I READ THAT BOOK FROM MY MAC COMPUTER ALSO

    Only if you are running OS 10.9, which includes the iBooks app.

  • HT5772 how can i delete books from ibooks on iMac

    how can i delete books from ibooks on imac?

    That doesn't work. It only allows you to delete your local copy but keeps the book in your library. The instructions on Apple's site are also incorrect. They suggest going to iTunes and selecting Books from the Library menu, but there is no Books option under that menu in the current version.
    Anyone at Apple listening?

  • HT204365 Why did all my PDF files disappear from ibooks on my iPad

    All of my PDF files disappeared from iBooks on my iPad. Where and why did they suddenly disappear? How can I retrieve them?

    As far as I can work out, from incomplete downloads, ticks denote all downloaded ok. 
    The manually manage option is for those who want to tailor their library collections in Music and Video to specific items.  If you have this ticked, then it will sync with the sync selections in your devices pages (eg, Music, videos). 
    If you want to sync all of your collection 'all' the time, leave manually manage off and put the a tick in the devices' page to sync all items  Dependent on iCloud use, and or automatic download options in iTunes, new purchased items are added and synced automatically as they are added - this only applies to Store purchased items.
    If you are going to added content outside of the Store, then Manually Manage is the option to take for Music and Videos - it does not affect anything else. IE Apps or podcasts, etc.
    If you have manually manage off, and 'selected playlist' option ticked, then it will sync existing ticked items, but new items downloaded will require you tick them (a) after the next iTunes automatic download when it connects to the store and  downloads any items, or (b) you download to a device and then sync the device, in which case it transfers the new download to your library - but, as happened to you, deletes it from your idevice.
    Retcicking and resyncing will add the item back on next sync.
    Don't forget that whenever making any kind of manual change to hit Apply and resync, to stop changes being lost.
    However, and i cannot stress this enough, iTunes is very problematic, especially when handling large collections.  Its sync operations can be erratic or non-functional at times (even buggy perhaps)
    If all options fail, then go to your program installation control folder (Control panel\Programs etc on windows) and select to repair iTunes.
    And if you have not already got it
    http://help.apple.com/ipad/5/interface/  the ipad manual (not the used guide - this is more about how it operates)
    may prove usefiul to you.
    Best wishes, Ct

  • How can I transfer contacts from my Iphone to ipad without using a computer?

    How can I transfer contacts from my Iphone to ipad without using a computer?

    The easiest method is to setup an iCloud account, turn on Contacts syncing in Settings > iCloud on both devices, and the Contacts from the iPhone will sync to the iPad.

  • How can I transfer photos from my pc to iPad using iTunes?

    HOw can I transfer photos from my pc to iPad using iTUnes?

    Connect and select your iPad on the left-hand side of your computer's iTunes, and on the right-hand side there should be a series of tabs, one of which should be Photos - if you select that tab you can then select which photo folders to sync to the iPad. There is a bit more info on this page (though it looks like Apple are doing some maintenance at the moment so the link isn't working). You will need to sync all the photos that you want on the iPad together in one go as only the most recent photo sync remains on the iPad - not including photos in a subsequent sync is how you delete them from the iPad (synced photos can't be deleted directly on the iPad).

  • How can I export photos from iphoto to my ipad

    How can I export photos from iphoto to my ipad?

    Like putting every thing else on to your iPad, this is done via iTunes.

  • How to email/print my highlights or notes from ibooks or kindle ipad app?

    How to email/print my highlights or notes from ibooks or kindle ipad app?

    I also had this question, and spent time puzzling over it.  But here's the answer:
    Open the relevant iBook
    Click the icon that looks like a 3 line bullett list
    Click on Notes
    Click on the icon in the top right hand side that looks like a page with an up arrow pointing out of it.
    Choose Edit Notes
    Select the notes or highlights that you want printing (a tick appears in the circular radio button)
    Click SHARE
    Choose either Mail or Print
    Voila

  • I can-t see netTV from Mediaset on the ipad because I cannot install Silverlight. Is there any ipad compatible Silverlight version goin to be released? When? Or is there any other apple application I can use in place of Silverlight?

    I can't see netTV from Mediaset on the ipad because I cannot install Silverlight. Is there any ipad compatible Silverlight version goin to be released? When?
    Or is there any other apple application I can use in place of Silverlight?
    I just want to see a service I'm paying for on the ipad instead of PC, it should be allowed!!!!
    Roberto

    I red about a Silverlight 5 version that should run also on ipad/iphone, annouced last year for 2011, but I can't find any recent update. On apple store you can find a silverlight 3 version at 5.99$, but it does not seem to be the same thing, just same name.
    I'm not sure that this closure is a good policy from apple side. If I knew in advance I would never buy an ipad.

  • If I purchase a tv show on apple tv can i download it from itunes to my ipad for free. I ask because when i look in itunes on the ipad, a price and buy now appears next to the tv show.

    If I purchase a tv show on apple tv can i download it from itunes to my ipad for free. I ask because when i look in itunes on the ipad, a price and buy now appears next to the tv show.

    Welcome to the Apple Community.
    In the store (iTunes App) go to the purchased section at the bottom (photo from iPhone but it's the same on the iPad)

  • Can't Download Magazines from Newstand on mini Ipad

    I can't download magazines from Newstand on mini ipad. I used to be able to up to about 3months ago. It is not a problem with my account as I am able to download the subscribed magazines on the normal ipad. It is just with the mini ipad that i seem to have issues. I have tried reinstalling the subscribed magazines and logging in/out but to no avail. The wifi is always on so i don't think that is the problem. i have checked all software upgrades on my mini ipad and nothing is outstanding. have written to Magster support several times but they are unable to help. Does anyone have a similar problem?

    Try logging out in Settings > iTunes & App Store > Apple ID: > sign out and do a reset
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data.
    Log back in and make sure you have access to the Internet via Wi-Fi, try again.

  • Can i watch videos from iphoto on my ipad?

    can i watch videos from iphoto on my ipad?

    I watch videos synced from iPhoto - videos that I have taken with my iPod Touch. The videos must be in a supported format.
    Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

  • HT201356 I have accidentally deleted my alternate iCloud (email) address. Are there any possibilities to retrieve it back because my iPad is connected to that email address, and now, I can't log out from it on my iPad, because it doesn't exist?

    I have accidentally deleted my alternate iCloud (email) address. Are there any possibilities to retrieve it back because my iPad is connected to that email address, and now, I can't log out from it on my iPad, because it doesn't exist.
    I have alternate icloud email attached to my iPad and I accidentally delete it from appleid.apple.com. And now I can't log out that iCloud account because it doesn't exist and it can't recognize my password.

    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple IDand that ID is a previous version of your current ID, not an entirely different one.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details and some other circumstances.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device. It may take a short while to remove the account.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

Maybe you are looking for

  • FYI with status cancelled

    Hi, I have created a FYI notification in WF. This notification will timeout every 5days. However, during the timeout, the FUI notifications is not sent to the desired email WHen query the wf_notification table, the status of this notification is as f

  • If profile of user will be changed ,does user needs  to be set password.

    Hi folks, just have some bit confusion, i a user profile is changed, will it require to set  user password ? Please advise Regards.

  • List of text symbols

    hi, Can i get the o/p as list of text-001,text-002......text-a001....depending on nos of literals in given code. eg: Literal         Text Symbol 'ABC'           text-001 'DEF'           text-003 'Line is'       text-aa1 Thanks

  • 2960X stack with 3650G question

    Hello all, Please see attached file first. We have two existing Cisco 3650G with root/secondary bridge for resilience, now we want to add two Cisco 2960X with stack and for two server resilience with LACP, is it possible to do that ? Thanks

  • How is Inheritance handled by JDO.?(Seeking Clarification)

    Question about the following: From the JDO Spec: 6.5 "For example, if an abstract class Component declares a key field masterId, the objectid class (which should be abstract as well) ComponentKey must also declare a field of the same type and name. N