Embed samp applications in your web page

<ul id="sampApplications"><!-- Populated by script --></ul> <script type="text=javascript"> $(document).ready( function() { $.getJSON('http://apps.jmmc.fr/exist/apps/smprsc/json.xql' ).done(function(data) { $.each(data.SampApplication, function(i, f) { var li = "<li><a href='"+ f.jnlp_url + "'><img src='"+f.icon_url +"' width='30' style='vertical-align:middle;'/>&#160;" + f.name + "</a></li>"; $("#sampApplications").append(li); }); } ).fail(function(){ console.log( "error, can't retrieve samp application" ); } ).always(function() { console.log( "complete" ); }); } ); </script>
Javascript to include onto your web page

Sample

View JSON

TODO

  • Provide a javascript to embed instead of the long code (see AladinLite Approach)
  • Provide a filtering mecanism to limit to some capabilities (mtype)
  • Fix bug with non jnlp application
  • Use icon_url hosted by JMMC for applications without web reference

Credits

Many thanks to :

  • J.M. Glorian OVGSO for his contribution
  • T. Boch CDS for integration samples provided on AladinLite