logoalt Hacker News

6510yesterday at 2:41 PM0 repliesview on HN

Sounds great <table type="text/csv" src="mydata.csv"> Then have it generate actual html so that you can target th's, tr's and td's with css.

I believe the lowest hanging fruit would be <div src="article.html">

I think formData should also be available as interactive JSON but perhaps it is possible to also populate a form with fields from a json with something like:

   <form src="mydata.json">
     <table>
       <input name="baz" type="number">
     </table>
   </form>
Where mydata.json is:

   {"foo" : "bar", "baz" : "42"}
And have something like this come out:

   <form><table>
     <tr>
       <td><label for="foo">foo</label></td>
       <td><input type="text" name="foo" value="bar"></td>
     </tr>
     <tr>
       <td><label for="baz">baz</label></td>
       <td><input type="number" name="baz" value="42"></td>
     </tr>
   </table>
   </form>
It wouldn't cover everything but it is very nice not to have the later if you don't really need it.