Elements = new Array();
Title = $('#Title').val();
Picture = $('#Picture').val();
EditorText = $('#editor1').val();
var theForm, newInput1, newInput2, newInput3, newInput4;
theForm = document.createElement('form');
theForm.action = 'preview.php';
theForm.method = 'post';
theForm.target = '_blank';
newInput1 = document.createElement('input');
newInput1.type = 'hidden';
newInput1.name = 'Elements';
newInput1.value = Elements;
newInput2 = document.createElement('input');
newInput2.type = 'hidden';
newInput2.name = 'Title';
newInput2.value = Title;
newInput3 = document.createElement('input');
newInput3.type = 'file'; // <-- Important point here. If I make it a 'hidden' input type, it sends only the text-name of the file. If I make it a 'file' type, it does not work at all.
newInput3.name = 'Picture';
newInput3.value = Picture;
newInput4 = document.createElement('input');
newInput4.type = 'hidden';
newInput4.name = 'EditorText';
newInput4.value = EditorText;
Is there someone who have dealt with that issue before or is able to find a solution to this?
If necessary, I can also accept a new workaround to this, as far as we can keep the 3 forms in the page.
Thank you very much in advance.