i am new to mootoll what i want is to create a new element span and injuct image to it.
i write following code but not working
var newElementVar = new Element('span', {'id': 'id_namekhan','text': 'I am a new div'});
var my_img = new Element ('img' , {'src' :'uploading/'+json.get('fpath')+'' , 'style' : 'width:50px; text-align:left' }).inject(id_namekhan, 'top') ;
even the text I am a new div is not showing
Thanks