JavaScript is a powerful language for Web

Discussion in 'JavaScript' started by darcy, Jul 14, 2010.

  1. #1
    So, I want i can give u some help about it. :)
     
    darcy, Jul 14, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Ok, make me a javascript that grabs RSS feed and display it. :)
     
    Rainulf, Jul 14, 2010 IP
  3. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    lol. It's such a shame Javascript doesn't have sockets. I understand why it doesn't - but it is still a great language nonetheless. :)
     
    Deacalion, Jul 14, 2010 IP
  4. man0l

    man0l Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hehe, tricky question. While Javascript is client base, it will have security issues like this - the cross site requests are forbidden. But if an AJAX request is calling PHP script, it can be done easily.

    But there are solutions with jQuery with the $.getJson method. This is example for accessing Flickr API:

    $.getJSON('http://api.flickr.com/services/rest/?&method=flickr.photosets.getPhotos&api_key=' + apiKey + '&photoset_id=72157619415192530&format=json&jsoncallback=?', function (data){ /* process json data here */ }) 
    Code (markup):
    where apiKey variable is the API key from flickr.
     
    man0l, Jul 23, 2010 IP