Append inner html to a new table

done with

document.getElementById('output').innerHTML=document.getElementById('dataOutput').value;	

I’m using a converter to convert an excel doc into html… alls good here. The html gets displayed in

textarea #dataOutput.textInputs

I am now trying to append this html data into another plugin that recreates the table so I can manipulate/query the code. Not the best way to go about it I know - but the people I’m making this for give me no access to server, so I’m trying to make something that can be used locally.

excel info is pasted in and this outputs as html inside the above textarea. DataTables plugin will not accept textarea when function is called - so I need to get this html out and pass it to another table.

 <table id="output"></table>

Below doesnt seem to be doing what I expect - should it?

$(document).ready(function(){

var dataSrc = document.getElementById("dataOutput");	
var data = dataSrc.innerHTML;
var recip = document.getElementById("output")

recip.innerHTML = data;
	
$('#output').DataTable();
});

Eurgh! How difficult can this be?!

Copy the text in textarea dataOutput and send to another table/div

tried along the lines of above +

$(document).ready(function(){

$("#activate").click(function(){
var dataSrc = document.getElementById("dataOutput");	
var data = dataSrc.innerHTML;
$( "data" ).clone().appendTo( "#output" );
});
});
//////////////////////////////////////////////////////////////////////////////////////////////////
 $( "#dataOutput" ).clone().appendTo( "#output" );
/////////////////////////////////////////////////////////////////////////////////////////////////////
var dataSrc = document.getElementById("dataOutput");	
var data = dataSrc.innerHTML;
$( "data" ).clone().appendTo( "#output" );

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.