05-07-2011 02:01 AM - edited 05-07-2011 09:47 AM
which would be the correct way to assemble a list of pictures and some additional data?
1 - generating html with a script. Php, ajax and search for it using document.getElementById ("result"). innerHTML = data_result;.
2- Generate a Json with php script and fetch the info using ajax, generate the html with with javascript, bearing in mind that the process if full of logic
html+=' <div class="title" x-blackberry-focusable="true" ><div style="float:left;margin-top:5px;">'+x+'</div></di
html+=' <div class="content" id="'+x+'" style="display:block">';
for(y in result[x]){
html +=' <div x-blackberry-focusable="true" onclick="next('+result[x][y][0]+')" ><div ><img src="'+result[x][y][1]+'" /></div><div class="next"></div></div> ';
}
html+= '</div>';
}
html +="</div>"
document.getElementById("result").innerHTML =html;
05-10-2011 07:12 PM
How about using json response in HTML 5 ? It should be less pain compare to all the process.