Nextrek
Diff Revisions
300
vs
309
for /Android/SmartCharging/endPoints/examples/registrazione_locale.html
|
@@ -54,6 +54,8 @@ |
54 |
54 |
|
<div id="output_submit_image"></div> |
55 |
55 |
|
|
56 |
56 |
|
<script> |
|
57 |
+ |
var imgs = new Array(); |
|
58 |
+ |
|
57 |
59 |
|
$(document).ready(function() { |
58 |
60 |
|
$("#submit").submit(function(e) { |
59 |
61 |
|
e.preventDefault(); |
|
@@ -79,7 +81,8 @@ |
79 |
81 |
|
avatar: avatar, |
80 |
82 |
|
nomelocale: nomelocale, |
81 |
83 |
|
descrizione: descrizione, |
82 |
|
- |
tipologia: tipologia |
|
84 |
+ |
tipologia: tipologia, |
|
85 |
+ |
imgs: imgs |
83 |
86 |
|
} |
84 |
87 |
|
|
85 |
88 |
|
params = JSON.stringify(params); |
|
@@ -131,8 +134,10 @@ |
131 |
134 |
|
formData.append("image_file", image_file); |
132 |
135 |
|
|
133 |
136 |
|
function ajaxResUploadImage(data) { |
134 |
|
- |
var json_output = JSON.stringify(data); |
135 |
|
- |
$("#output_submit_image").append(json_output); |
|
137 |
+ |
//var json_output = JSON.stringify(data); |
|
138 |
+ |
var jsonObj = JSON.parse(data); |
|
139 |
+ |
imgs.push(jsonObj.image_file); |
|
140 |
+ |
$("#output_submit_image").append(data); |
136 |
141 |
|
} |
137 |
142 |
|
|
138 |
143 |
|
$.ajax({ |