语言

Menu
Sites
Language
Load API in tizen web app

Hi All;

I developed a web application with the Tizen 2.1. I use jQuery.getJSON(); to get the Flickr API. For example

<!DOCTYPE html>
<html>
<head>
  <style>img{ height: 100px; float: left; }</style>
  <script src="http://code.jquery.com/jquery-1.5.js"></script>

  <script src="/usr/share/tizen-web-ui-fw/latest/js/jquery.js"></script>
  <script src="/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
</head>
<body>
  <div id="images"> </div>
<script>
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
  {
    tags: "flower",
    tagmode: "any",
    format: "json"
  },
  function(data) {
    $.each(data.items, function(i,item){
      $("<img/>").attr("src", item.media.m).appendTo("#images");
      if ( i == 5 ) return false;
    });
  });</script>
</body>
</html>

It is run OK on chrome, but can not run on the Tizen.

I have added  <access origin="http://api.flickr.com" subdomains="true"/>  in config.xml file.

please help me.

thanks,

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

8 回复
konduri sai swathi
Hi , Kindly add <access origin="*" subdomains="true"/> in config file
Marco Buettner
I have a similar problem. I resolve this issue by adding this on a config.js $(document).bind("mobileinit", function() { $.mobile.allowCrossDomainPages(true); });
Vu Nguyen
Hi, I tried it with my config.xml file. ImageSlideShow But It just display "loading" on the screen. Please, you can try with my code above. thanks
Vu Nguyen
Hi, I tried it with my config.xml file. ImageSlideShow But It just display "loading" on the screen. Please, you can try with my code above. thanks
Vu Nguyen
ImageSlideShow
Vu Nguyen
I can not to post config.xml file
konduri sai swathi
Hi , when i added <access origin="*" subdomains="true"/> in config file i'm able to get the API . The screenshot of what i have got is here http://www.shareimage.ro/images/nlkw35d3h3tarohqd.png .Please Tell me the SDK version on which you are working .
Vu Nguyen
hi Konduri , I use SDK 2.1, Your way is very good, it has to load the image. thank you,