SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Paris
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JSOn to JS Eval Problem

    What's wrong with this code?

    Code JavaScript:
    // Example ObjetSmartLink en json
    var SmartlinkJson = {"id_source":"7315f47dba65515fca60c851d7065bc6","url_source":"http:\/\/news.yahoo.com\/s\/afp\/20060822\/od_afp\/chinacateringcultureoffbeat_060822074830","title_source":"Jail-theme teahouse becomes prisoner of own success in China - Yahoo! News","smartlinks_infos":[{"id_dest":"75effc69e8c68b389c65c67119463312","score":"126","deleted":"0","date":"1164279208","zone_cible":"151","manually_added":"0","url_dest":"http:\/\/news.yahoo.com\/s\/afp\/20060825\/od_afp\/malaysiahealthtoilets_060825160532","title_dest":"Malaysia calls for \"toilet revolution\" - Yahoo! News"}]} 
     
    //fonction de construction de SmartLinks
    function SmartLink(url_source,title_source,id_source)
    {
    	this.url_source = url_source; //l'url du document source du SmartLinks
    	this.title_source = title_source; // titre du doc source du SmartLinks
    	this.id_source = id_source; //l'id de la source du SmartLinks
    	this.smartlinks_info = new array; //tableau de liens cible avec info sur la zone, la date etc...
     
     
    }
     
    var SmartLink = eval('(' + SmartlinkJson + ')');
     
    alert(smartlink);
    On a PHP/Java/XML/Javascript/MySQL internship right now!

  2. #2
    SitePoint Addict
    Join Date
    Jan 2005
    Location
    Paris
    Posts
    370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    duplicate, verry sorry for this please erase this thread!
    On a PHP/Java/XML/Javascript/MySQL internship right now!


Bookmarks

Posting Permissions

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