×

Discussion Board

Results 1 to 4 of 4

Thread: using ajax

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    18

    Unhappy using ajax

    hi,

    sorry if this question sounds like a stupid one, I am still learning the WRT developing and as of now I still haven't try doing AJAX calls. I'll be using jQuery or mootools if ever I'll do some ajax, my question is how is it possible to do ajax if we have the "same origin policy". Am I not understanding something here? Please enlighten me.

    thanks,

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: using ajax

    Hi james_027,

    same origin policy does not apply to Web Runtime widgets (they actually run in their "local" domain). Basically, you can perform Ajax request toward any remote hosts

    Pit

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    18

    Re: using ajax

    Quote Originally Posted by jappit View Post
    Hi james_027,

    same origin policy does not apply to Web Runtime widgets (they actually run in their "local" domain). Basically, you can perform Ajax request toward any remote hosts

    Pit
    hi i am using jquery to do ajax. to test it in my html file i have a tag like this <div id="content_div"></div>

    then I have a javascript that do this

    $('#content_div').load("http://www.twitter.com");

    but nothing happens when I launch it on the emulator


    thanks,

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: using ajax

    Hi james_027,

    you should try debugging your code to see what actually happens. For example:

    * does $('#content_div') return any elements?
    * does the Ajax network request start?

    Check out this Wiki article, that could help with JavaScript debugging:

    http://wiki.forum.nokia.com/index.ph...Output_console

    Pit

Similar Threads

  1. 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
  2. AJAX in mobile
    By vivartpandey in forum Mobile Java General
    Replies: 1
    Last Post: 2008-05-28, 15:34
  3. Urgent::Can I use ajax to download file?
    By winwon14 in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2007-09-25, 23:33
  4. 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
  •  
×