facebook

ajax http get

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #321965 Reply

    stv1234
    Member

    This message has not been recovered.

    #321969 Reply

    stv1234
    Member

    This message has not been recovered.

    #321995 Reply

    support-michael
    Keymaster

    This message has not been recovered.

    #322006 Reply

    stv1234
    Member

    This message has not been recovered.

    #322007 Reply

    support-michael
    Keymaster

    This message has not been recovered.

    #322009 Reply

    stv1234
    Member

    This message has not been recovered.

    #322011 Reply

    support-vadim
    Participant

    This message has not been recovered.

    #325356 Reply

    JohnJake
    Member

    Hello support.

    Can you please provide the complete new version (including Wayne’s workaround) in a zip file?! I followed several threads but couldn’t finally make it work using MobiOne 1.5. Have there been changes in the latest version(s) according the cross site problem?

    Thx in advance. John

    BTW. I need to add a special char set and this should be done by setting properties of the Request Header. I need charset ‘charset=ISO-8859-1’…..

    #325387 Reply

    JohnJake
    Member

    Hi there.

    Parts of this threads are based upon the issue to get plain html data from a diferent website. Here is the link to that older thread:
    http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=1686&hilit=http+request

    Based upon that Wayne stated, that in the shortness of time he did not yet find a solution for the cross domain problem, so he made a copy of the html/asp file from he server and put it among the local files.
    Yann added later on, that he found a solution and posted that. But that solution didn’t work for me.

    And in this thread, the cross domain problem still persists. But here I found a work-around sent by Wayne on December 28th, 2011, to change the Request and also work with redirection. The next comment “That nailed it” seems to work. So I adapted my code as well, but this didn’t work either.

    So I would like you to provide a little project “remote-dataset” (the one of the above mentioned topic) containing the work-around of Wayne. Just to see if it still works with Version 1.5 or if I made a typo or any other mistake.
    Can you please do that for me/us?
    Thx in advance.
    John.

    #325389 Reply

    support-michael
    Keymaster

    @JohnJake

    Thanks for the details clarification. Will see what we can do. Digging out after a hiatus working on MobiOne 2.0M1 that rolled out last night.

    #325506 Reply

    JohnJake
    Member

    @Wayne

    Is there any chance that you provide an updated remote-data sample to read content of a different domain’s web page?!
    Actually I need to read html content that is provided by a rather simple php file.
    It seems that the sample of Yann and stv1234 is just working with URLs containing a .html file. Testing the same with a .php file did not work.

    Also the .html URL solution doesn’t run without problems since the request.readyState and the request.status say, that there was an error while reading.
    I could not get any other samples to work. So, please send me/us just an updated and simple sample that is reading the html content of a URL like this http://www.somedomain.tld/folder/website1.php

    Thx in advance.

    #325533 Reply

    JohnJake
    Member

    @Octavio.

    Thx, that sample works.
    Sorry, for some reason I did not find that example in my searches.

    John

    #326442 Reply

    JohnJake2
    Member

    Hello support (Wayne, Octavio).

    As posted earlier on April, 18th, I need to use a certain charset in order to get the right characters while requesting information from a different web site.
    In my case I need charset ‘charset=ISO-8859-1’……
    How can this be done?

    Thx in advance, JohnJake(2)

    #326464 Reply

    support-michael
    Keymaster

    @JohnJake2

    We need a few more details. How are you interfacing with your server/webservice? Are you doing an http form submission, some type of ajax request, … other? If not a form submission, what is the structure of your data submission?

    Feel free to share snippet of code if that will be more efficient to get us up to speed.

    #326529 Reply

    JohnJake2
    Member

    Hi Wayne.
    It is just the simple page submission from your sample. So I put in the URL of a php page into the form’s properties and handling the submit action in the forms custom.js file:

    */
    phoneui.postSubmitForm_m1_myform = function(isSuccess, data) {
    // add custom postubmission processing code here,
    // e.g., parse and process results & update UI controls with data as needed
    // return false to terminate form processing
    var result = true;
    if (isSuccess) {
    // process data
    doSomeThing(data);
    result = true;
    } else {
    // submit failed
    // data = error msg
    result = false;
    }
    return result;
    }

    The code works, but I am not dealing with UTF-8, an ISO-8859-1 charset is required for displaying the correct accents.
    Thx in advance.
    JohnJake(2)

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: ajax http get

You must be logged in to post in the forum log in