×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    11

    Nokia wrt ajax JSON post

    Hi,

    I am using the following code to request JSON with parameters this code works fine in simulator (Nokia web tools), but on device (S60 3rd eidtion), it returns status 0 and responseText empty

    I also check this in firefox 8.0, found same result as device

    $.ajax({
    type: "POST",
    url: "http://testing/login.json",
    data: params,
    success: function(data){
    alert('success');
    },
    error: function(data){
    alert('fail');
    }
    })


    Please Help!
    Last edited by SHSaqlaini; 2011-11-17 at 07:42. Reason: more detail

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Nokia wrt ajax JSON post

    I'm supposing it is WRT widget you are doing, thus did you add the AllowNetworkAccess into the Info.plist already ?

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    11

    Re: Nokia wrt ajax JSON post

    Thanks for quick reply:

    yes, you are rite, I have defined AllowNetworkAccess true.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Nokia wrt ajax JSON post

    so lets clear that you do have AllowNetworkAccess defined and you still have this problem ?

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    11

    Re: Nokia wrt ajax JSON post

    yes, defined and still having this problem.

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Nokia wrt ajax JSON post

    I basically have had the problem only when I missed the network access. Anyway, 3rd ed devices though could have a bit worse support for JavaScript, thus can you try the XMLHttpRequest instead as shown in: http://www.developer.nokia.com/Commu...ith_JavaScript

  7. #7
    Registered User
    Join Date
    Oct 2011
    Posts
    11

    Re: Nokia wrt ajax JSON post

    do you have any working example for this ?

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Nokia wrt ajax JSON post

    what would be wrong with the example found from the link given ?

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    11

    Re: Nokia wrt ajax JSON post

    I'm not able to download that

  10. #10
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Nokia wrt ajax JSON post

    You could basically copy-paste the code from the page and modify to suit your own use case..

Similar Threads

  1. How to download JSON ME Api "org.json.me.zip"
    By narendar_discover in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2010-05-01, 12:15
  2. TypeError in AJAX POST passed to PySerial
    By spogs in forum Symbian
    Replies: 1
    Last Post: 2010-01-05, 00:03
  3. using ajax
    By james_027 in forum Symbian
    Replies: 3
    Last Post: 2009-06-26, 17:07
  4. Ajax browser in Nokia 6131 or Nokia 6212
    By fh_08 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2009-06-08, 15:04
  5. Does Nokia Browser support AJAX?? Help..
    By DancingWave in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2007-05-12, 15:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×