Line 370: |
Line 370: |
| </pre> | | </pre> |
| This will return JSON | | This will return JSON |
− |
| |
− | ===== Ignore me =====
| |
− | <pre>
| |
− | $.post('/cgi/ingredients.pl',
| |
− | { }, function(data) {
| |
− |
| |
− | if (data.status == 0) {
| |
− | $('div[id="ocrbuttondiv_' + imagefield +'"]').html(Lang.extracted_ingredients_ok);
| |
− | var ingredients_text_id = imagefield.replace("ingredients","ingredients_text");
| |
− | $("#" + ingredients_text_id).val(data.ingredients_text_from_image);
| |
− | }
| |
− | else {
| |
− | $('div[id="ocrbuttondiv_' + imagefield +'"]').html(Lang.extracted_ingredients_nok);
| |
− | }
| |
− | $(document).foundation('equalizer', 'reflow');
| |
− | }, 'json');
| |
− | </pre>
| |