below is a part of my javascript file\[code\]$("#imgBox").append('<div id="inner_div_electric" style="position: relative; top: '+innerDivElectricTop+'px; left: '+innerDivElectricLeft+'px;width:'+innerDivElectricWidth+'px;height:'+innerDivElectricHeight+'px;"></div>'); for(var i=1; i<=sidewalls; i++) { for(var j=1; j<=backwalls; j++) { var newDiv = "<span id='droppable"+i+""+j+"' onclick='changeText(this.id);' class='droppable_class' style='width:"+(cellWidth-2)+"px; height:"+(cellHeight-2)+"px;border:1px dotted red;display:inline-block;margin:0px;padding:0px;float:left;'></span>"; $("#inner_div_electric").append(newDiv); } }\[/code\]Here imgBox is a div, and in that div am dynamically creating spans to generate sqare boxes in that div.\[code\]$('.droppable_class').html('');if($('#'+id).html('')){ $('#'+id).html('<font face="calibri" color="red"><b>OUTLET</b></font>');}\[/code\]This is the code to generate the text 'OUTLET' in a span which I clicked. I need to send the div as it is from this javascript file to php to generate pdf of that particular diagram which contains sqare boxes and one particular span contains the text 'OUTLET'.Any ideas how to achieve it?Thanks